]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
basename() returns a string sometimes.. go shaleh. but this makes it work both ways.
[chaz/openbox] / src / Window.cc
index dd5f3b71b824e64ff499557d69e6b05dd909e73d..4824a34acadc4b2ded219ea7c32264eef5faac4a 100644 (file)
@@ -153,7 +153,7 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
   windowmenu = 0;
 
   /*
-    get the initial size and location of client window (relative to the
+    set the initial size and location of client window (relative to the
     _root window_). This position is the reference point used with the
     window's gravity to find the window's initial position.
   */
@@ -2612,11 +2612,12 @@ void BlackboxWindow::mapRequestEvent(const XMapRequestEvent *re) {
 #endif // DEBUG
 
   /*
-     Even thought the window wants to be shown, if it is not on the current
+     Even though the window wants to be shown, if it is not on the current
      workspace, then it isn't going to be shown right now.
   */
-  if (blackbox_attrib.workspace != screen->getCurrentWorkspaceID())
-    current_state = WithdrawnState;
+  if (blackbox_attrib.workspace != screen->getCurrentWorkspaceID() &&
+      blackbox_attrib.workspace < screen->getWorkspaceCount())
+    if (current_state == NormalState) current_state = WithdrawnState;
 
   switch (current_state) {
   case IconicState:
@@ -2718,12 +2719,13 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
     // determine if this is a transient window
     getTransientInfo();
 
+    if (flags.stuck != s) stick();
+
     // adjust the window decorations based on transience
     if (isTransient()) {
       functions &= ~Func_Maximize;
       setAllowedActions();
       setupDecor();
-      if (flags.stuck != s) stick();
     }
 
     reconfigure();
This page took 0.020986 seconds and 4 git commands to generate.