[mutter] window: Don't use clutter_stage_get_default
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Don't use clutter_stage_get_default
- Date: Wed, 23 Apr 2014 21:01:59 +0000 (UTC)
commit 18d609ad6da3de90988eec855025810f3938c649
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 23 16:55:18 2014 -0400
window: Don't use clutter_stage_get_default
It doesn't work, for the same reasons.
src/core/window.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 9e32967..18f4ddd 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9194,6 +9194,13 @@ mouse_mode_focus (MetaWindow *window,
}
static gboolean
+window_has_pointer (MetaWindow *window)
+{
+ ClutterActor *actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
+ return clutter_actor_has_pointer (actor);
+}
+
+static gboolean
window_focus_on_pointer_rest_callback (gpointer data)
{
MetaFocusData *focus_data = data;
@@ -9203,7 +9210,6 @@ window_focus_on_pointer_rest_callback (gpointer data)
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (screen);
int root_x, root_y;
guint32 timestamp;
- ClutterActor *child;
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
goto out;
@@ -9218,17 +9224,7 @@ window_focus_on_pointer_rest_callback (gpointer data)
return TRUE;
}
- child = clutter_stage_get_actor_at_pos (CLUTTER_STAGE (clutter_stage_get_default ()),
- CLUTTER_PICK_REACTIVE, root_x, root_y);
- if (!META_IS_SURFACE_ACTOR (child))
- goto out;
-
- window =
- meta_stack_get_default_focus_window_at_point (screen->stack,
- screen->active_workspace,
- NULL, root_x, root_y);
-
- if (window == NULL)
+ if (!window_has_pointer (window))
goto out;
timestamp = meta_display_get_current_time_roundtrip (display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]