? src/.keybindings.c.swp
? src/libmetacity-private.la
? src/libmetacity_private_la-gradient.lo
? src/libmetacity_private_la-preview-widget.lo
? src/libmetacity_private_la-theme-parser.lo
? src/libmetacity_private_la-theme.lo
? src/libmetacity_private_la-util.lo
? src/tools/.deps
? src/tools/.libs
? src/wm-tester/.deps
? src/wm-tester/.libs
Index: src/keybindings.c
===================================================================
RCS file: /cvs/gnome/metacity/src/keybindings.c,v
retrieving revision 1.126
diff -u -p -r1.126 keybindings.c
--- src/keybindings.c	13 Feb 2006 19:26:40 -0000	1.126
+++ src/keybindings.c	18 Feb 2006 00:18:13 -0000
@@ -804,6 +804,29 @@ display_get_keybinding_action (MetaDispl
   return META_KEYBINDING_ACTION_NONE;
 }
 
+
+static MetaKeyBindingAction
+display_get_window_keybinding_action (MetaDisplay  *display,
+                                      unsigned int  keysym,
+                                      unsigned long mask)
+{
+  int i;
+
+  i = display->n_window_bindings - 1;
+  while (i >= 0)
+    {
+      if (display->window_bindings[i].keysym == keysym &&
+          display->window_bindings[i].mask == mask)
+        {
+          return meta_prefs_get_window_keybinding_action (display->window_bindings[i].name);
+        }
+      
+      --i;
+    }
+
+  return META_KEYBINDING_ACTION_NONE;
+}
+
 void
 meta_display_process_mapping_event (MetaDisplay *display,
                                     XEvent      *event)
@@ -2441,6 +2464,11 @@ process_tab_grab (MetaDisplay *display,
     }
   else
     {
+      MetaKeyBindingAction window_action =
+         display_get_window_keybinding_action (display,
+                                               keysym,
+                                               display->grab_mask);
+ 
       /* end grab */
       meta_topic (META_DEBUG_KEYBINDINGS,
                   "Ending tabbing/cycling, uninteresting key pressed\n");
@@ -2455,6 +2483,34 @@ process_tab_grab (MetaDisplay *display,
           meta_window_minimize (prev_window);
           prev_window->tab_unminimized = FALSE;
         }
+
+      if (window_action != META_KEYBINDING_ACTION_NONE)
+        {
+          /* They broke out of cycling with a window action. Carry out
+           * that action now.
+           */
+          
+          Window target_xwindow;
+          MetaWindow *target_window;
+
+          target_xwindow =
+           (Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
+          target_window =
+            meta_display_lookup_x_window (display, target_xwindow);
+          
+          /* Break out of the grab early, because process_event() might
+           * want to start a new grab.
+           */
+
+          meta_display_end_grab_op (display, event->xkey.time);
+
+          process_event (display->window_bindings,
+                         display->n_window_bindings,
+                         window_handlers,
+                         display, screen, target_window, event, keysym);
+
+          return TRUE; /* Don't end the grab for us: we've already done it. */
+        }     
     }
   
   return key_used;
Index: src/prefs.c
===================================================================
RCS file: /cvs/gnome/metacity/src/prefs.c,v
retrieving revision 1.61
diff -u -p -r1.61 prefs.c
--- src/prefs.c	16 Feb 2006 20:26:05 -0000	1.61
+++ src/prefs.c	18 Feb 2006 00:18:15 -0000
@@ -2496,6 +2496,23 @@ meta_prefs_get_keybinding_action (const 
   return META_KEYBINDING_ACTION_NONE;
 }
 
+MetaKeyBindingAction
+meta_prefs_get_window_keybinding_action (const char *name)
+{
+  int i;
+
+  i = G_N_ELEMENTS (window_bindings) - 2; /* -2 for dummy entry at end */
+  while (i >= 0)
+    {
+      if (strcmp (window_bindings[i].name, name) == 0)
+        return (MetaKeyBindingAction) i;
+      
+      --i;
+    }
+
+  return META_KEYBINDING_ACTION_NONE;
+}
+
 void
 meta_prefs_get_window_binding (const char          *name,
                                unsigned int        *keysym,
Index: src/prefs.h
===================================================================
RCS file: /cvs/gnome/metacity/src/prefs.h,v
retrieving revision 1.40
diff -u -p -r1.40 prefs.h
--- src/prefs.h	16 Feb 2006 20:26:05 -0000	1.40
+++ src/prefs.h	18 Feb 2006 00:18:15 -0000
@@ -259,6 +259,7 @@ void meta_prefs_get_window_bindings (con
                                      int                *n_bindings);
 
 MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
+MetaKeyBindingAction meta_prefs_get_window_keybinding_action (const char *name);
 
 void meta_prefs_get_window_binding (const char          *name,
                                     unsigned int        *keysym,
