]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
no const weirdness
[chaz/openbox] / openbox / client.c
index 0701d3fa3b7d40c616a085b4bd2829e8cbe98efc..8ba71172b49eb2f44b6f1d14efccf73a61ee2e16 100644 (file)
@@ -390,6 +390,8 @@ void client_manage(Window window)
                      "program + user specified" :
                      "BADNESS !?")))), placew, placeh);
 
+        /* splash screens are also returned as TRUE for transient,
+           and so will be forced on screen below */
         transient = place_client(self, &placex, &placey, settings);
 
         /* make sure the window is visible. */
@@ -403,7 +405,11 @@ void client_manage(Window window)
                                 place.c or by the user are allowed partially
                                 off-screen and on xinerama divides (ie,
                                 it is up to the placement routines to avoid
-                                the xinerama divides) */
+                                the xinerama divides)
+
+                                splash screens get "transient" set to TRUE by
+                                the place_client call
+                             */
                              transient ||
                              (!(self->positioned & USPosition) &&
                               client_normal(self) &&
@@ -414,7 +420,11 @@ void client_manage(Window window)
        the visible screen area on its monitor. Use basically the same rules
        for forcing the window on screen in the client_find_onscreen call.
 
-       do this after place_client, it chooses the monitor! */
+       do this after place_client, it chooses the monitor!
+
+       splash screens get "transient" set to TRUE by
+       the place_client call
+    */
     if (transient ||
         (!(self->sized & USSize) &&
          client_normal(self) &&
@@ -2840,8 +2850,8 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
         SIZE_SET(self->logical_size, logicalw, logicalh);
 
     /* figure out if we moved or resized or what */
-    moved = x != self->area.x || y != self->area.y;
-    resized = w != self->area.width || h != self->area.height;
+    moved = (x != self->area.x || y != self->area.y);
+    resized = (w != self->area.width || h != self->area.height);
 
     oldw = self->area.width;
     oldh = self->area.height;
@@ -2907,8 +2917,12 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
                    FALSE, StructureNotifyMask, &event);
     }
 
-    /* if the client is shrinking, then resize the frame before the client */
-    if (send_resize_client && (w <= oldw && h <= oldh)) {
+    /* if the client is shrinking, then resize the frame before the client.
+
+       both of these resize sections may run, because the top one only resizes
+       in the direction that is growing
+     */
+    if (send_resize_client && (w <= oldw || h <= oldh)) {
         frame_adjust_client_area(self->frame);
         XResizeWindow(ob_display, self->window, w, h);
     }
This page took 0.021032 seconds and 4 git commands to generate.