]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
act on the visibly focused window when that differs from the actual focused window
[chaz/openbox] / openbox / event.c
index e5f8d45ca5193281a9b8f7268d17fb934787c7cf..c744e3ab9828931e3f55034fdc217e3f27f9e362 100644 (file)
@@ -499,7 +499,11 @@ static void event_process(const XEvent *ec, gpointer data)
                     e->type == MotionNotify)
                     mouse_event(client, context, e);
                 else if (e->type == KeyPress)
-                    keyboard_event(client, e);
+                    /* when in the middle of a focus cycling action, this
+                       causes the window which appears to be focused to be
+                       the one on which the actions will be executed */
+                    keyboard_event((focus_cycle_target ?
+                                    focus_cycle_target : client), e);
             }
         }
     }
@@ -1126,8 +1130,7 @@ static void event_handle_menu(XEvent *ev)
         else {
             if ((e = menu_entry_frame_under(ev->xbutton.x_root,
                                             ev->xbutton.y_root)))
-                menu_entry_frame_execute(e,
-                                         !(ev->xbutton.state & ControlMask));
+                menu_entry_frame_execute(e, ev->xbutton.state);
         }
         break;
     case MotionNotify:
@@ -1145,8 +1148,7 @@ static void event_handle_menu(XEvent *ev)
         else if (ev->xkey.keycode == ob_keycode(OB_KEY_RETURN)) {
             ObMenuFrame *f;
             if ((f = find_active_menu()))
-                menu_entry_frame_execute(f->selected,
-                                         !(ev->xkey.state & ControlMask));
+                menu_entry_frame_execute(f->selected, ev->xkey.state);
         } else if (ev->xkey.keycode == ob_keycode(OB_KEY_LEFT)) {
             ObMenuFrame *f;
             if ((f = find_active_menu()) && f->parent)
This page took 0.0243 seconds and 4 git commands to generate.