summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-01-15 23:19:06 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-01-15 23:19:06 +0000
commit3194faaa9cbe39f37e664470c40054d6621b2fd0 (patch)
tree5c38a16a6692395181dd034d2e9e232f6479879c /src
parente532a300b084a627a09610dcb7047bffb0f3fad4 (diff)
downloadmetacity-3194faaa9cbe39f37e664470c40054d6621b2fd0.tar.gz
metacity-3194faaa9cbe39f37e664470c40054d6621b2fd0.tar.bz2
fix crash when grab failed due to another operation in progress
2002-01-15 Havoc Pennington <hp@redhat.com> * src/keybindings.c (handle_tab_backward): fix crash when grab failed due to another operation in progress (handle_tab_forward): fix crash when grab failed
Diffstat (limited to 'src')
-rw-r--r--src/keybindings.c58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/keybindings.c b/src/keybindings.c
index 8d2ce2a..c1b0f9a 100644
--- a/src/keybindings.c
+++ b/src/keybindings.c
@@ -980,20 +980,21 @@ handle_tab_forward (MetaDisplay *display,
{
meta_verbose ("Starting tab forward, showing popup\n");
- meta_display_begin_grab_op (window->display,
- display->focus_window ?
- display->focus_window : window,
- META_GRAB_OP_KEYBOARD_TABBING,
- FALSE,
- 0, 0,
- event->xkey.time,
- 0, 0);
-
- meta_ui_tab_popup_select (window->screen->tab_popup,
- window->xwindow);
- /* only after selecting proper window */
- meta_ui_tab_popup_set_showing (window->screen->tab_popup,
- TRUE);
+ if (meta_display_begin_grab_op (window->display,
+ display->focus_window ?
+ display->focus_window : window,
+ META_GRAB_OP_KEYBOARD_TABBING,
+ FALSE,
+ 0, 0,
+ event->xkey.time,
+ 0, 0))
+ {
+ meta_ui_tab_popup_select (window->screen->tab_popup,
+ window->xwindow);
+ /* only after selecting proper window */
+ meta_ui_tab_popup_set_showing (window->screen->tab_popup,
+ TRUE);
+ }
}
}
@@ -1040,20 +1041,21 @@ handle_tab_backward (MetaDisplay *display,
{
meta_verbose ("Starting tab backward, showing popup\n");
- meta_display_begin_grab_op (window->display,
- display->focus_window ?
- display->focus_window : window,
- META_GRAB_OP_KEYBOARD_TABBING,
- FALSE,
- 0, 0,
- event->xkey.time,
- 0, 0);
-
- meta_ui_tab_popup_select (window->screen->tab_popup,
- window->xwindow);
- /* only after selecting proper window */
- meta_ui_tab_popup_set_showing (window->screen->tab_popup,
- TRUE);
+ if (meta_display_begin_grab_op (window->display,
+ display->focus_window ?
+ display->focus_window : window,
+ META_GRAB_OP_KEYBOARD_TABBING,
+ FALSE,
+ 0, 0,
+ event->xkey.time,
+ 0, 0))
+ {
+ meta_ui_tab_popup_select (window->screen->tab_popup,
+ window->xwindow);
+ /* only after selecting proper window */
+ meta_ui_tab_popup_set_showing (window->screen->tab_popup,
+ TRUE);
+ }
}
}