mutter/src/x11
Marco Trevisan (Treviño) 1f56514e40 x11-display: Don't unset the X11 focused window after setting one
When using DesktopIcons extension and clicking in an icon, gnome-shell
starts an infinite loop caused by the first focus change that may trigger
on X11 a focus in/out event that leads to stage activation/deactivation
which never ends.

This happens because as part of meta_x11_display_set_input_focus_xwindow()
to focus the X11 stage window, we unset the display focus, but this also
causes to request the X11 display to unset the focus since we convolute by
calling meta_x11_display_set_input_focus() with no window, that leads to
focusing the no_focus_window and then a focus-in / focus-out dance that the
shell amplifies in order to give back the focus to the stage.

In order to fix this, mimic what meta_display_set_input_focus() does, but
without updating the X11 display, and so without implicitly calling
meta_x11_display_set_input_focus(), stopping the said convolution and
properly focusing the requested xwindow.
Also ensure that we're not doing this when using an older timestamp, since
this check isn't performed anymore.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/896
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/899

https://gitlab.gnome.org/GNOME/mutter/merge_requests/909


(cherry picked from commit efe5bed5b4)
2019-11-06 17:48:19 +00:00
..
atomnames.h x11: Remove hide-titlebar-when-maximized support 2018-11-26 13:12:18 +00:00
events.c xprops: Use g_new0 instead of calloc in meta_prop_get_motif_hints() 2019-10-03 17:20:54 +00:00
events.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
group-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
group-props.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
group-props.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
group.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
iconcache.c iconcache: Avoid xrender picture formats when creating cairo surface 2019-08-27 18:47:41 +03:00
iconcache.h Move X11 event, icon cache and property handling to MetaX11Display 2018-07-06 19:47:16 +02:00
meta-selection-source-x11-private.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
meta-selection-source-x11.c x11: Map mimetypes back to selection atoms 2019-10-12 19:18:19 +02:00
meta-startup-notification-x11.c core: Fix differing sequence timestamp precision expectations 2019-04-17 18:41:13 +02:00
meta-startup-notification-x11.h x11: Add method to launch applications, using SnLauncher 2019-01-18 17:03:57 +00:00
meta-x11-display-private.h x11: Minor refactor of input focus handling code 2019-09-13 20:55:57 +00:00
meta-x11-display.c x11-display: Don't unset the X11 focused window after setting one 2019-11-06 17:48:19 +00:00
meta-x11-errors.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-x11-selection-input-stream-private.h x11: Add X11 selection input/output streams 2019-05-02 15:40:13 +02:00
meta-x11-selection-input-stream.c x11: Add X11 selection input/output streams 2019-05-02 15:40:13 +02:00
meta-x11-selection-output-stream-private.h x11: Add X11 selection input/output streams 2019-05-02 15:40:13 +02:00
meta-x11-selection-output-stream.c x11: Add X11 selection input/output streams 2019-05-02 15:40:13 +02:00
meta-x11-selection-private.h Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public 2019-05-02 16:31:45 +02:00
meta-x11-selection.c x11: Do not warn on cancelled X11 selection sources 2019-05-15 13:14:12 +00:00
meta-x11-stack-private.h x11: Add MetaX11Stack object 2019-05-24 15:30:31 +00:00
meta-x11-stack.c core: Move Stack to StackTracker synchronization back to stack.c 2019-08-26 17:39:10 +00:00
mutter-Xatomtype.h mutter-Xatomtype: Fix the sizes of these structs 2015-06-23 11:46:29 -07:00
session.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
session.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
window-props.c window-x11: Fix _XOPEN_SOURCE usage for gethostname on FreeBSD 2019-06-24 09:35:02 +00:00
window-props.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
window-x11-private.h window: Move can_ping to a function and implement in X11 2019-02-13 02:07:41 +00:00
window-x11.c window-x11: Refactor meta_prop_get_latin1_string() calls 2019-10-03 17:20:54 +00:00
window-x11.h window: Move can_ping to a function and implement in X11 2019-02-13 02:07:41 +00:00
xprops.c xprops: Use g_new0 instead of malloc in size_hints_from_results() 2019-10-03 17:20:54 +00:00
xprops.h Clean up include macros mess 2018-11-06 17:17:36 +01:00