summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-08-15 13:30:31 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-08-15 13:46:54 -0400
commit471e6b9e1324e2a83e40e969d8bb9f654981fee3 (patch)
treed35471560e6a43c1229eb231c693cf1a13798d41
parentf8dcea397574d3d618b4612f73666233b5819150 (diff)
downloadmutter-471e6b9e1324e2a83e40e969d8bb9f654981fee3.tar.gz
cursor-renderer: Popups need to set cursors, too
Popups could not set the cursor image, because the cursor tracker would ignore window cursors if we had a popup active. The correct condition to check for is already in should_block_wayland. Rename this to the more sensible name windows_are_interactable, and use it in the cursor tracker.
-rw-r--r--src/backends/meta-cursor-tracker.c2
-rw-r--r--src/core/display-private.h2
-rw-r--r--src/core/display.c14
3 files changed, 8 insertions, 10 deletions
diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c
index 905b5d19f..13991457e 100644
--- a/src/backends/meta-cursor-tracker.c
+++ b/src/backends/meta-cursor-tracker.c
@@ -61,7 +61,7 @@ get_displayed_cursor (MetaCursorTracker *tracker)
if (!tracker->is_showing)
return NULL;
- if (display->grab_op == META_GRAB_OP_NONE)
+ if (meta_grab_op_windows_are_interactable (display->grab_op))
{
if (tracker->has_window_cursor)
return tracker->window_cursor;
diff --git a/src/core/display-private.h b/src/core/display-private.h
index a43253282..da2bec2b2 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -380,7 +380,7 @@ gboolean meta_grab_op_is_resizing (MetaGrabOp op);
gboolean meta_grab_op_is_moving_or_resizing (MetaGrabOp op);
gboolean meta_grab_op_is_mouse (MetaGrabOp op);
gboolean meta_grab_op_is_keyboard (MetaGrabOp op);
-gboolean meta_grab_op_should_block_wayland (MetaGrabOp op);
+gboolean meta_grab_op_windows_are_interactable (MetaGrabOp op);
void meta_display_increment_focus_sentinel (MetaDisplay *display);
void meta_display_decrement_focus_sentinel (MetaDisplay *display);
diff --git a/src/core/display.c b/src/core/display.c
index 527cb1e13..4a5062c6e 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1261,23 +1261,21 @@ meta_grab_op_is_moving_or_resizing (MetaGrabOp op)
}
/**
- * meta_grab_op_should_block_wayland:
+ * meta_grab_op_windows_are_interactable:
* @op: A #MetaGrabOp
*
- * Starting a grab with one of these grab operations means
- * that we will remove key / pointer focus from the current
- * Wayland focus.
+ * Whether windows can be interacted with in this grab operation.
*/
gboolean
-meta_grab_op_should_block_wayland (MetaGrabOp op)
+meta_grab_op_windows_are_interactable (MetaGrabOp op)
{
switch (op)
{
case META_GRAB_OP_WAYLAND_POPUP:
case META_GRAB_OP_NONE:
- return FALSE;
- default:
return TRUE;
+ default:
+ return FALSE;
}
}
@@ -1446,7 +1444,7 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display)
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWindow *focus_window = NULL;
- if (meta_grab_op_should_block_wayland (display->grab_op))
+ if (!meta_grab_op_windows_are_interactable (display->grab_op))
focus_window = NULL;
else if (meta_display_xwindow_is_a_no_focus_window (display, display->focus_xwindow))
focus_window = NULL;