]> Dogcows Code - chaz/openbox/commitdiff
- raise the window during maximization if the user clicked the maximize button, but...
authorDana Jansens <danakj@orodu.net>
Sat, 25 May 2002 15:45:09 +0000 (15:45 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 25 May 2002 15:45:09 +0000 (15:45 +0000)
- two fixes here.  1) only raise window in maximize if the window is focused, 2) remap window on reparent event

src/Window.cc

index 7ca881ac4a7e938fba2d57fcdf98e7b73c1c0006..2bc7265d5fe93a52575c79c280e99b3259ef2503 100644 (file)
@@ -1442,9 +1442,11 @@ void BlackboxWindow::maximize(unsigned int button) {
     blackbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert);
     blackbox_attrib.attrib &= ! (AttribMaxHoriz | AttribMaxVert);
 
-    // when a resize is begun, maximize(0) is called to clear any maximization
-    // flags currently set.  Otherwise it still thinks it is maximized.
-    // so we do not need to call configure() because resizing will handle it
+    /*
+      when a resize is begun, maximize(0) is called to clear any maximization
+      flags currently set.  Otherwise it still thinks it is maximized.
+      so we do not need to call configure() because resizing will handle it
+    */
     if (!flags.resizing)
       configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y,
                 blackbox_attrib.premax_w, blackbox_attrib.premax_h);
@@ -1499,7 +1501,8 @@ void BlackboxWindow::maximize(unsigned int button) {
 
   configure(frame.changing.x(), frame.changing.y(),
             frame.changing.width(), frame.changing.height());
-  screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
+  if (flags.focused)
+    screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
   redrawAllButtons();
   setState(current_state);
 }
@@ -2640,8 +2643,10 @@ void BlackboxWindow::restore(bool remap) {
   XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, client.old_bw);
 
   XEvent ev;
-  if (! XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
-                               ReparentNotify, &ev)) {
+  if (XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
+                             ReparentNotify, &ev)) {
+    remap = True;
+  } else {
     // according to the ICCCM - if the client doesn't reparent to
     // root, then we have to do it for them
     XReparentWindow(blackbox->getXDisplay(), client.window,
This page took 0.025417 seconds and 4 git commands to generate.