]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
add a big comment about more menus
[chaz/openbox] / openbox / client.c
index e1c814ce39c5d33138b40115a0475799a5171a44..5a6f443ae82d3b157a136067044b74a6357653bd 100644 (file)
@@ -349,10 +349,11 @@ void client_manage(Window window)
          client_search_focus_tree_full(self)) &&
         /* this checks for focus=false for the window */
         (!settings || settings->focus != 0) &&
-        /* note the check against Type_Normal/Dialog, not client_normal(self),
-           which would also include other types. in this case we want more
-           strict rules for focus */
+        /* note the check against type Normal/Dialog/Utility,
+           not client_normal(self), which would also include other types.
+           in this case we want more strict rules for focus */
         (self->type == OB_CLIENT_TYPE_NORMAL ||
+         self->type == OB_CLIENT_TYPE_UTILITY ||
          self->type == OB_CLIENT_TYPE_DIALOG))
     {
         activate = TRUE;
@@ -2850,8 +2851,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;
@@ -2917,8 +2918,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.020845 seconds and 4 git commands to generate.