[mutter] display: Correct check for grab_window_buttons
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Correct check for grab_window_buttons
- Date: Thu, 8 May 2014 18:19:39 +0000 (UTC)
commit 7b3cdc8f9620b8f6c29c67acba7848262bd85af1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu May 8 14:14:30 2014 -0400
display: Correct check for grab_window_buttons
When we're a Wayland compositor, we get all the events, no exceptions,
so we don't need to grab.
This was masking focusing and raising issues under nested that showed
up under native.
src/core/display.c | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 7eeac51..464ddf9 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2012,10 +2012,7 @@ void
meta_display_grab_window_buttons (MetaDisplay *display,
Window xwindow)
{
- MetaBackend *backend = meta_get_backend ();
-
- /* Do nothing under non-X11 backends */
- if (!META_IS_BACKEND_X11 (backend))
+ if (meta_is_wayland_compositor ())
return;
/* Grab Alt + button1 for moving window.
@@ -2068,15 +2065,12 @@ void
meta_display_ungrab_window_buttons (MetaDisplay *display,
Window xwindow)
{
- MetaBackend *backend = meta_get_backend ();
-
- /* Do nothing under non-X11 backends */
- if (!META_IS_BACKEND_X11 (backend))
- return;
-
gboolean debug;
int i;
+ if (meta_is_wayland_compositor ())
+ return;
+
if (display->window_grab_modifiers == 0)
return;
@@ -2102,10 +2096,7 @@ void
meta_display_grab_focus_window_button (MetaDisplay *display,
MetaWindow *window)
{
- MetaBackend *backend = meta_get_backend ();
-
- /* Do nothing under non-X11 backends */
- if (!META_IS_BACKEND_X11 (backend))
+ if (meta_is_wayland_compositor ())
return;
/* Grab button 1 for activating unfocused windows */
@@ -2157,10 +2148,7 @@ void
meta_display_ungrab_focus_window_button (MetaDisplay *display,
MetaWindow *window)
{
- MetaBackend *backend = meta_get_backend ();
-
- /* Do nothing under non-X11 backends */
- if (!META_IS_BACKEND_X11 (backend))
+ if (meta_is_wayland_compositor ())
return;
meta_verbose ("Ungrabbing unfocused window buttons for %s\n", window->desc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]