X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=2c243882a079b71b57ee2b32f247d73ed245e717;hb=3f7ad89510b3182d69a9543f78637619eb13219f;hp=c74e15ae08a8e3bd7ae96da0c4519df99054b012;hpb=78af5d15e9dd94959786811e9eddfa1e5024067c;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index c74e15ae..2c243882 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -579,7 +579,7 @@ static void event_handle_root(XEvent *e) switch(e->type) { case SelectionClear: ob_debug("Another WM has requested to replace us. Exiting.\n"); - ob_exit(0); + ob_exit_replace(); break; case ClientMessage: @@ -596,6 +596,11 @@ static void event_handle_root(XEvent *e) screen_set_num_desktops(d); } else if (msgtype == prop_atoms.net_showing_desktop) { screen_show_desktop(e->xclient.data.l[0] != 0); + } else if (msgtype == prop_atoms.ob_control) { + if (e->xclient.data.l[0] == 1) + ob_reconfigure(); + else if (e->xclient.data.l[0] == 2) + ob_restart(); } break; case PropertyNotify: @@ -853,8 +858,13 @@ static void event_handle_client(ObClient *client, XEvent *e) client->frame->size.left + client->frame->size.right; gint fh = h + client->frame->size.top + client->frame->size.bottom; + /* make this rude for size-only changes but not for position + changes.. */ + gboolean moving = ((e->xconfigurerequest.value_mask & CWX) || + (e->xconfigurerequest.value_mask & CWY)); + client_find_onscreen(client, &newx, &newy, fw, fh, - client_normal(client)); + !moving); if (e->xconfigurerequest.value_mask & CWX) x = newx; if (e->xconfigurerequest.value_mask & CWY)