summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2019-04-14 17:15:06 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-05-02 23:54:22 +0000
commit0d50a37091244e7c61e1e99857cd1a1b531d4911 (patch)
tree3a0f459920bca9bbdebb8178ba04c2ab1a80ccc4 /src
parent1ca0fdc928511edea57b72bfb798be84b8293b1e (diff)
downloadmutter-0d50a37091244e7c61e1e99857cd1a1b531d4911.tar.gz
display: Fix a possible bug in meta_display_sync_wayland_focus
The check for the focus xwindow is called, but not used. Fix that by renaming the variable to reflect better what it does and actually using the return value of the check. This was the original intention of the author in commit 05899596d10918df5359d89baa82e6fedd0ae208 and got broken in commit 8e7e1eeef59c4f74046e6783b6334c1432255c5a. https://gitlab.gnome.org/GNOME/mutter/merge_requests/535
Diffstat (limited to 'src')
-rw-r--r--src/core/display.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/display.c b/src/core/display.c
index 819c61d5c..adef7de5d 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1214,15 +1214,15 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display)
MetaWindow *focus_window = NULL;
MetaBackend *backend = meta_get_backend ();
MetaStage *stage = META_STAGE (meta_backend_get_stage (backend));
- gboolean is_focus_xwindow = FALSE;
+ gboolean is_no_focus_xwindow = FALSE;
if (display->x11_display)
- meta_x11_display_xwindow_is_a_no_focus_window (display->x11_display,
- display->x11_display->focus_xwindow);
+ is_no_focus_xwindow = meta_x11_display_xwindow_is_a_no_focus_window (display->x11_display,
+ display->x11_display->focus_xwindow);
if (!meta_display_windows_are_interactable (display))
focus_window = NULL;
- else if (is_focus_xwindow)
+ else if (is_no_focus_xwindow)
focus_window = NULL;
else if (display->focus_window && display->focus_window->surface)
focus_window = display->focus_window;