From: Mikael Magnusson Date: Sat, 4 Oct 2008 11:03:18 +0000 (+0200) Subject: Disallow some more stuff on locked windows X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=419e4ca499f7c0ee219534c690d9d7e2993a8d9a;p=mikachu%2Fopenbox.git Disallow some more stuff on locked windows --- diff --git a/openbox/event.c b/openbox/event.c index 72f47fc6..1488cbff 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1465,15 +1465,10 @@ static void event_handle_client(ObClient *client, XEvent *e) ob_debug_type(OB_DEBUG_APP_BUGS, "_NET_ACTIVE_WINDOW message for window %s is " "missing source indication", client->title); - /* TODO(danakj) This should use - (e->xclient.data.l[0] == 0 || - e->xclient.data.l[0] == 2) - to determine if a user requested the activation, however GTK+ - applications seem unable to make this distinction ever - (including panels such as xfce4-panel and gnome-panel). - So we are left just assuming all activations are from the user. - */ - client_activate(client, FALSE, FALSE, TRUE, TRUE, TRUE); + if (!client->locked) + client_activate(client, FALSE, FALSE, TRUE, TRUE, + (e->xclient.data.l[0] == 0 || + e->xclient.data.l[0] == 2)); } else if (msgtype == OBT_PROP_ATOM(NET_WM_MOVERESIZE)) { ob_debug("net_wm_moveresize for 0x%lx direction %d", client->window, e->xclient.data.l[2]); @@ -1502,9 +1497,10 @@ static void event_handle_client(ObClient *client, XEvent *e) (Atom)e->xclient.data.l[2] == OBT_PROP_ATOM(NET_WM_MOVERESIZE_MOVE_KEYBOARD)) { - moveresize_start(client, e->xclient.data.l[0], - e->xclient.data.l[1], e->xclient.data.l[3], - e->xclient.data.l[2]); + if (!client->locked) + moveresize_start(client, e->xclient.data.l[0], + e->xclient.data.l[1], e->xclient.data.l[3], + e->xclient.data.l[2]); } else if ((Atom)e->xclient.data.l[2] == OBT_PROP_ATOM(NET_WM_MOVERESIZE_CANCEL))