]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
make helper windows share desktops with all their application top level windows
[chaz/openbox] / openbox / event.c
index ff21918be9c162d049d1a437b93e39f7eb38c791..9a1ebb2f9add26369f0212c43d55eeffbe94e13d 100644 (file)
@@ -504,6 +504,7 @@ static void event_process(const XEvent *ec, gpointer data)
             frame_adjust_focus(client->frame, TRUE);
             focus_set_client(client);
             client_calc_layer(client);
+            client_bring_non_application_windows(client);
         }
     } else if (e->type == FocusOut) {
         gboolean nomove = FALSE;
@@ -709,8 +710,15 @@ static void event_handle_client(ObClient *client, XEvent *e)
     case ButtonPress:
     case ButtonRelease:
         /* Wheel buttons don't draw because they are an instant click, so it
-           is a waste of resources to go drawing it. */
-        if (!(e->xbutton.button == 4 || e->xbutton.button == 5)) {
+           is a waste of resources to go drawing it.
+           if the user is doing an intereactive thing, or has a menu open then
+           the mouse is grabbed (possibly) and if we get these events we don't
+           want to deal with them
+        */
+        if (!(e->xbutton.button == 4 || e->xbutton.button == 5) &&
+            !keyboard_interactively_grabbed() &&
+            !menu_frame_visible)
+        {
             con = frame_context(client, e->xbutton.window);
             con = mouse_button_frame_context(con, e->xbutton.button);
             switch (con) {
@@ -1017,7 +1025,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             if ((unsigned)e->xclient.data.l[0] < screen_num_desktops ||
                 (unsigned)e->xclient.data.l[0] == DESKTOP_ALL)
                 client_set_desktop(client, (unsigned)e->xclient.data.l[0],
-                                   FALSE);
+                                   FALSE, FALSE);
         } else if (msgtype == prop_atoms.net_wm_state) {
             /* can't compress these */
             ob_debug("net_wm_state %s %ld %ld for 0x%lx\n",
@@ -1167,10 +1175,6 @@ static void event_handle_client(ObClient *client, XEvent *e)
                    msgtype == prop_atoms.net_wm_icon_name ||
                    msgtype == prop_atoms.wm_icon_name) {
             client_update_title(client);
-        } else if (msgtype == prop_atoms.wm_command) {
-            client_update_command(client);
-        } else if (msgtype == prop_atoms.wm_class) {
-            client_update_class(client);
         } else if (msgtype == prop_atoms.wm_protocols) {
             client_update_protocols(client);
             client_setup_decor_and_functions(client);
@@ -1192,9 +1196,6 @@ static void event_handle_client(ObClient *client, XEvent *e)
             client_update_sync_request_counter(client);
         }
 #endif
-        else if (msgtype == prop_atoms.sm_client_id) {
-            client_update_sm_client_id(client);
-        }
     case ColormapNotify:
         client_update_colormap(client, e->xcolormap.colormap);
         break;
This page took 0.023449 seconds and 4 git commands to generate.