]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
eat enter events when the new alttab popup hides
[chaz/openbox] / openbox / client.c
index 5cc1df9a3cab46b28eac80d88bcd8784f4c1f6ed..68dfedce3468ba67d5874910ec3ef3692627668f 100644 (file)
@@ -241,6 +241,7 @@ void client_manage(Window window)
     XWMHints *wmhint;
     gboolean activate = FALSE;
     ObAppSettings *settings;
+    gint placex, placey;
 
     grab_server(TRUE);
 
@@ -359,6 +360,15 @@ void client_manage(Window window)
         activate = TRUE;
     }
 
+    /* adjust the frame to the client's size before showing or placing
+       the window */
+    frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
+    frame_adjust_client_area(self->frame);
+
+    /* where the frame was placed is where the window was originally */
+    placex = self->area.x;
+    placey = self->area.y;
+
     /* figure out placement for the window */
     if (ob_state() == OB_STATE_RUNNING) {
         gboolean transient;
@@ -369,10 +379,10 @@ void client_manage(Window window)
                    (self->positioned == USPosition ? "user specified" :
                     "BADNESS !?"))), self->area.x, self->area.y);
 
-        transient = place_client(self, &self->area.x, &self->area.y, settings);
+        transient = place_client(self, &placex, &placey, settings);
 
         /* make sure the window is visible. */
-        client_find_onscreen(self, &self->area.x, &self->area.y,
+        client_find_onscreen(self, &placex, &placey,
                              self->area.width, self->area.height,
                              /* non-normal clients has less rules, and
                                 windows that are being restored from a
@@ -392,17 +402,12 @@ void client_manage(Window window)
     }
 
     ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",
-             self->window, self->area.x, self->area.y,
+             self->window, placex, placey,
              self->area.width, self->area.height);
     if (self->session)
         ob_debug("  but session requested %d %d instead, overriding\n",
                  self->session->x, self->session->y);
 
-    /* adjust the frame to the client's size before showing the window */
-    frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
-    frame_adjust_client_area(self->frame);
-
-
     /* do this after the window is placed, so the premax/prefullscreen numbers
        won't be all wacko!!
        also, this moves the window to the position where it has been placed
@@ -419,7 +424,7 @@ void client_manage(Window window)
        will get the right sizes and positions if the client is starting with
        those states
     */
-    client_configure(self, self->area.x, self->area.y,
+    client_configure(self, placex, placey,
                      self->area.width, self->area.height,
                      FALSE, TRUE);
 
@@ -932,10 +937,10 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h,
         POINT_SET(newbl, newtl.x, newbr.y);
 
         /* is it moving or just resizing from some corner? */
-        stationary_l = oldtl.x == oldtl.x;
-        stationary_r = oldtr.x == oldtr.x;
-        stationary_t = oldtl.y == oldtl.y;
-        stationary_b = oldbl.y == oldbl.y;
+        stationary_l = oldtl.x == newtl.x;
+        stationary_r = oldtr.x == newtr.x;
+        stationary_t = oldtl.y == newtl.y;
+        stationary_b = oldbl.y == newbl.y;
 
         /* if left edge is growing and didnt move right edge */
         if (stationary_r && newtl.x < oldtl.x)
This page took 0.022508 seconds and 4 git commands to generate.