[mutter/wip/xinput2] window: make guess_grab_pointer() more reliable
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/xinput2] window: make guess_grab_pointer() more reliable
- Date: Sat, 6 Aug 2011 08:47:59 +0000 (UTC)
commit f6d9b29ad01c4c4e74e9eb9d7342239abe4a03b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jul 19 21:02:21 2011 +0200
window: make guess_grab_pointer() more reliable
Now either the current focus keyboard or the client pointer
(i.e. the pointer paired to the last keyboard that had the
window focus) are used to guess the pointer that should be
grabbed.
src/core/window.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 27adffd..d61ac0b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -10558,10 +10558,8 @@ meta_window_get_client_pointer (MetaWindow *window)
MetaDevice *
meta_window_guess_grab_pointer (MetaWindow *window)
{
- /* FIXME: This ought to be the very last resort, ideally
- * the current/last focus device should be used to find
- * this out, or the client pointer.
- */
- return meta_device_map_lookup (window->display->device_map,
- META_CORE_POINTER_ID);
+ if (window->focus_keyboard)
+ return meta_device_get_paired_device (window->focus_keyboard);
+
+ return meta_window_get_client_pointer (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]