]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
changes to the timer api, pass the timer to the callback function.
[chaz/openbox] / openbox / event.c
index 5116148cd3021604b85c797ac91f206bdcfaeb71..a0515e2eebd73e419a32023bdcd73a93479a09a2 100644 (file)
@@ -758,15 +758,16 @@ static void event_handle_client(ObClient *client, XEvent *e)
        /* if we are iconic (or shaded (fvwm does this)) ignore the event */
        if (client->iconic || client->shaded) return;
 
-       if (e->xconfigurerequest.value_mask & CWBorderWidth)
-           client->border_width = e->xconfigurerequest.border_width;
-
        /* resize, then move, as specified in the EWMH section 7.7 */
        if (e->xconfigurerequest.value_mask & (CWWidth | CWHeight |
-                                              CWX | CWY)) {
+                                              CWX | CWY |
+                                               CWBorderWidth)) {
            int x, y, w, h;
            ObCorner corner;
 
+            if (e->xconfigurerequest.value_mask & CWBorderWidth)
+                client->border_width = e->xconfigurerequest.border_width;
+
            x = (e->xconfigurerequest.value_mask & CWX) ?
                e->xconfigurerequest.x : client->area.x;
            y = (e->xconfigurerequest.value_mask & CWY) ?
@@ -779,7 +780,11 @@ static void event_handle_client(ObClient *client, XEvent *e)
             {
                 int newx = x;
                 int newy = y;
-                client_find_onscreen(client, &newx, &newy, w, h, TRUE);
+                int fw = w +
+                    client->frame->size.left + client->frame->size.right;
+                int fh = h +
+                    client->frame->size.top + client->frame->size.bottom;
+                client_find_onscreen(client, &newx, &newy, fw, fh, TRUE);
                 if (e->xconfigurerequest.value_mask & CWX)
                     x = newx;
                 if (e->xconfigurerequest.value_mask & CWY)
@@ -802,7 +807,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
                corner = OB_CORNER_TOPLEFT;
            }
 
-           client_configure(client, corner, x, y, w, h, FALSE, TRUE);
+           client_configure_full(client, corner, x, y, w, h, FALSE, TRUE,
+                                  TRUE);
        }
 
        if (e->xconfigurerequest.value_mask & CWStackMode) {
@@ -967,17 +973,21 @@ static void event_handle_client(ObClient *client, XEvent *e)
             if (e->xclient.data.l[0] & 1 << 10)
                 w = e->xclient.data.l[3];
             else
-                w = client->area.y;
+                w = client->area.width;
             if (e->xclient.data.l[0] & 1 << 11)
                 h = e->xclient.data.l[4];
             else
-                h = client->area.y;
+                h = client->area.height;
             client->gravity = tmpg;
 
             {
                 int newx = x;
                 int newy = y;
-                client_find_onscreen(client, &newx, &newy, w, h, TRUE);
+                int fw = w +
+                    client->frame->size.left + client->frame->size.right;
+                int fh = h +
+                    client->frame->size.top + client->frame->size.bottom;
+                client_find_onscreen(client, &newx, &newy, fw, fh, TRUE);
                 if (e->xclient.data.l[0] & 1 << 8)
                     x = newx;
                 if (e->xclient.data.l[0] & 1 << 9)
@@ -1032,7 +1042,6 @@ static void event_handle_client(ObClient *client, XEvent *e)
            client_setup_decor_and_functions(client);
        }
        else if (msgtype == prop_atoms.net_wm_strut) {
-            g_message("strut change");
            client_update_strut(client);
         }
        else if (msgtype == prop_atoms.net_wm_icon ||
@@ -1093,7 +1102,7 @@ static void event_handle_menu(ObClient *client, XEvent *e)
 
         /* will call the menu_hide() for each submenu as well */
         if (!it)
-            menu_hide(menu_visible->data);
+            menu_control_keyboard_nav(ob_keycode(OB_KEY_ESCAPE));
        
         break;
     case MotionNotify:
@@ -1135,7 +1144,7 @@ static void find_max_fd()
                        (gpointer)&tmpmax);
     max_fd = MAX(x_fd, tmpmax);
 #ifdef USE_SM
-    max_fd = MAX(ice_fd, tmpmax);
+    max_fd = MAX(ice_fd, max_fd);
 #endif
 }
 
This page took 0.026268 seconds and 4 git commands to generate.