diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-07-19 21:02:21 +0200 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-11-03 19:47:36 -0400 |
commit | 8037cc5ec496b379830b513d42a0bce472a19ac1 (patch) | |
tree | de449ea785f1fdf1ce1d50c81707e313de45b8f3 | |
parent | 275ab901b0a9e121f50e6233cbbbf1388e94dba3 (diff) | |
download | mutter-8037cc5ec496b379830b513d42a0bce472a19ac1.tar.gz |
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.
-rw-r--r-- | 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 d09258fb7..43158f683 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -11102,10 +11102,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); } |