]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
Allow the user to bind more than one keycode to a keysym for Ob Menus/Move/Resize
[chaz/openbox] / openbox / event.c
index 93c5fa21797b8651dc17990e15ea79dc781b5d0d..881c9f8fa935d3e09c8b1179bd0463993a4232cf 100644 (file)
@@ -1276,7 +1276,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
                                        it can happen now when the window is on
                                        another desktop, but we still don't
                                        want it! */
-        client_activate(client, FALSE, TRUE, TRUE, TRUE);
+        client_activate(client, FALSE, FALSE, TRUE, TRUE, TRUE);
         break;
     case ClientMessage:
         /* validate cuz we query stuff off the client here */
@@ -1332,7 +1332,7 @@ 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\n", client->title);
-            client_activate(client, TRUE, TRUE, TRUE,
+            client_activate(client, FALSE, FALSE, TRUE, TRUE,
                             (e->xclient.data.l[0] == 0 ||
                              e->xclient.data.l[0] == 2));
         } else if (msgtype == prop_atoms.net_wm_moveresize) {
@@ -1693,30 +1693,30 @@ static gboolean event_handle_menu_keyboard(XEvent *ev)
     else if (ev->type == KeyPress && (state & ~ControlMask) == 0) {
         frame->got_press = TRUE;
 
-        if (keycode == ob_keycode(OB_KEY_ESCAPE)) {
+        if (ob_keycode_match(keycode, OB_KEY_ESCAPE)) {
             menu_frame_hide_all();
             ret = TRUE;
         }
 
-        else if (keycode == ob_keycode(OB_KEY_LEFT)) {
+        else if (ob_keycode_match(keycode, OB_KEY_LEFT)) {
             /* Left goes to the parent menu */
             if (frame->parent)
                 menu_frame_select(frame, NULL, TRUE);
             ret = TRUE;
         }
 
-        else if (keycode == ob_keycode(OB_KEY_RIGHT)) {
+        else if (ob_keycode_match(keycode, OB_KEY_RIGHT)) {
             /* Right goes to the selected submenu */
             if (frame->child) menu_frame_select_next(frame->child);
             ret = TRUE;
         }
 
-        else if (keycode == ob_keycode(OB_KEY_UP)) {
+        else if (ob_keycode_match(keycode, OB_KEY_UP)) {
             menu_frame_select_previous(frame);
             ret = TRUE;
         }
 
-        else if (keycode == ob_keycode(OB_KEY_DOWN)) {
+        else if (ob_keycode_match(keycode, OB_KEY_DOWN)) {
             menu_frame_select_next(frame);
             ret = TRUE;
         }
@@ -1729,7 +1729,7 @@ static gboolean event_handle_menu_keyboard(XEvent *ev)
     else if (ev->type == KeyRelease && (state & ~ControlMask) == 0 &&
              frame->entries && frame->got_press)
     {
-        if (keycode == ob_keycode(OB_KEY_RETURN)) {
+        if (ob_keycode_match(keycode, OB_KEY_RETURN)) {
             /* Enter runs the active item or goes into the submenu.
                Control-Enter runs it without closing the menu. */
             if (frame->child)
This page took 0.022172 seconds and 4 git commands to generate.