X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=a7ed67fdab9664cddc32e8973e0b19666f3b0396;hb=4cd886e5188549ab48a11b70cb40b65efe916b6c;hp=08240ff260359f3e722e9e2d4967d155abb2f3de;hpb=067776e783fc0cb4a731c8ea226c8b6b3c50f053;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 08240ff2..a7ed67fd 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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) ? @@ -776,8 +777,7 @@ static void event_handle_client(ObClient *client, XEvent *e) h = (e->xconfigurerequest.value_mask & CWHeight) ? e->xconfigurerequest.height : client->area.height; - if (!(client->strut.left || client->strut.right || - client->strut.top || client->strut.bottom)) { + { int newx = x; int newy = y; client_find_onscreen(client, &newx, &newy, w, h, TRUE); @@ -803,7 +803,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) { @@ -968,15 +969,14 @@ 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; - if (!(client->strut.left || client->strut.right || - client->strut.top || client->strut.bottom)) { + { int newx = x; int newy = y; client_find_onscreen(client, &newx, &newy, w, h, TRUE); @@ -1034,7 +1034,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 || @@ -1095,7 +1094,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: