diff --git a/src/core/window.c b/src/core/window.c index 27adffdd0..d61ac0b39 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); }