Disallow some more stuff on locked windows
authorMikael Magnusson <mikachu@gmail.com>
Sat, 4 Oct 2008 11:03:18 +0000 (13:03 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sat, 11 Oct 2014 00:17:19 +0000 (02:17 +0200)
openbox/event.c

index 72f47fc639c213c89ec24bc84cb7d707365f040f..1488cbff9bfa925a57fbb0fcb963294f17081f33 100644 (file)
@@ -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))