diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/keybindings.c | 17 | ||||
-rw-r--r-- | src/menu.c | 8 | ||||
-rw-r--r-- | src/metacity.schemas.in | 26 | ||||
-rw-r--r-- | src/theme-parser.c | 5 |
4 files changed, 27 insertions, 29 deletions
diff --git a/src/keybindings.c b/src/keybindings.c index cd04c4f1..6b39ac16 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -1644,6 +1644,17 @@ process_event (MetaKeyBinding *bindings, "No handler found for this event in this binding table\n"); } +/* Handle a key event. May be called recursively: some key events cause + * grabs to be ended and then need to be processed again in their own + * right. This cannot cause infinite recursion because we never call + * ourselves when there wasn't a grab, and we always clear the grab + * first; the invariant is enforced using an assertion. See #112560. + * FIXME: We need to prove there are no race conditions here. + * FIXME: Does it correctly handle alt-Tab being followed by another + * grabbing keypress without letting go of alt? + * FIXME: An iterative solution would probably be simpler to understand + * (and help us solve the other fixmes). + */ void meta_display_process_key_event (MetaDisplay *display, MetaWindow *window, @@ -1791,6 +1802,12 @@ meta_display_process_key_event (MetaDisplay *display, "Ending grab op %u on key event sym %s\n", display->grab_op, XKeysymToString (keysym)); meta_display_end_grab_op (display, event->xkey.time); + + g_assert (display->grab_op == META_GRAB_OP_NONE); + + /* and go round again: #112560 */ + meta_display_process_key_event (display, window, event); + } } @@ -474,10 +474,12 @@ meta_window_menu_new (MetaFrames *frames, g_free, FALSE, FALSE); } - - gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi); + if (mi) + { + gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi); - gtk_widget_show (mi); + gtk_widget_show (mi); + } } } diff --git a/src/metacity.schemas.in b/src/metacity.schemas.in index 5929342f..dd87b102 100644 --- a/src/metacity.schemas.in +++ b/src/metacity.schemas.in @@ -93,28 +93,10 @@ <short>Whether raising should be a side-effect of other user interactions</short> <long> - Setting this option to false can lead to buggy behavior, so - users are strongly discouraged from changing it from the default - of true. - - Many actions (e.g. clicking in the client area, moving or - resizing the window) normally raise the window as a - side-effect. Set this option to false to decouple raising from - other user actions. Even when this option is false, windows can - still be raised by an alt-left-click anywhere on the window, a - normal click on the window decorations, or by special messages - from pagers, such as activation requests from tasklist applets. - This option is currently disabled in click-to-focus mode. - - Note that the list of ways to raise windows when raise_on_click - is false does not include programmatic requests from - applications to raise windows; such requests will be ignored - regardless of the reason for the request. If you are an - application developer and have a user complaining that your - application does not work with this setting disabled, tell them - it is _their_ fault for breaking their window manager and that - they need to change this option back to true or live with the - bug they requested. See also + Many actions (e.g. clicking in the client area, moving or resizing the window) + normally raise the window as a side-effect. Setting this option to false, which + is strongly discouraged, will decouple raising from other user actions, and + ignore raise requests generated by applications. See http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6. </long> </locale> diff --git a/src/theme-parser.c b/src/theme-parser.c index 0d9c1491..2a98b814 100644 --- a/src/theme-parser.c +++ b/src/theme-parser.c @@ -374,9 +374,6 @@ locate_attributes (GMarkupParseContext *context, va_end (args); - if (!retval) - return retval; - i = 0; while (attribute_names[i]) { @@ -3207,7 +3204,7 @@ parse_draw_op_element (GMarkupParseContext *context, if (tile_xoffset && !check_expression (tile_xoffset, FALSE, info->theme, context, error)) return; - if (tile_yoffset && !check_expression (tile_xoffset, FALSE, info->theme, context, error)) + if (tile_yoffset && !check_expression (tile_yoffset, FALSE, info->theme, context, error)) return; /* x/y/width/height default to 0,0,width,height - should |