]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
dont let windows get initially mapped when they arent on the current workspace
[chaz/openbox] / src / Window.cc
index 0b161f6ca642fb7342586ff4d64d683c7fac7d8e..60182ce952e38dbccb224df533d8b570792db4f7 100644 (file)
@@ -2611,6 +2611,13 @@ void BlackboxWindow::mapRequestEvent(const XMapRequestEvent *re) {
           client.window);
 #endif // DEBUG
 
+  /*
+     Even thought 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;
+
   switch (current_state) {
   case IconicState:
     iconify();
@@ -2706,6 +2713,8 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
     break;
 
   case XA_WM_TRANSIENT_FOR: {
+    bool s = flags.stuck;
+    
     // determine if this is a transient window
     getTransientInfo();
 
@@ -2714,6 +2723,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
       functions &= ~Func_Maximize;
       setAllowedActions();
       setupDecor();
+      if (flags.stuck != s) stick();
     }
 
     reconfigure();
This page took 0.024456 seconds and 4 git commands to generate.