Revert "app: Don't grab the pointer when doing scrolling"
This reverts commit 413cf9ad85
.
As discussed with mitch during last Wilber Week, and commented in !924,
the fix was creating new problem and was not right. We definitely want
to grab pointer events when panning (or other similar interactions).
Also I think I had not tested under Wayland back then, only verified I
didn't see any huge issue on X11, but the commit did not in fact fix the
original issue #8016 (this time, I verified!). The problem I was
encountering seem to be more in how Wayland works + libinput, not giving
full control on input devices to applications and trying to be "smart"
with an option ("Disable Touchpad While Typing") which is often useful,
but other times counter-productive (e.g. in GIMP when we want to
space-panning — which should not be considered typing —, or again
shortcuts in video games, and so on).
This commit is contained in:
@ -1695,6 +1695,10 @@ gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
|
||||
mod_action = GIMP_MODIFIER_ACTION_ZOOMING;
|
||||
}
|
||||
|
||||
gimp_display_shell_pointer_grab (shell, event,
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK);
|
||||
|
||||
shell->scroll_start_x = x;
|
||||
shell->scroll_start_y = y;
|
||||
shell->scroll_last_x = x;
|
||||
@ -1805,6 +1809,12 @@ gimp_display_shell_stop_scrolling (GimpDisplayShell *shell,
|
||||
shell->scroll_last_x = 0;
|
||||
shell->scroll_last_y = 0;
|
||||
shell->rotate_drag_angle = 0.0;
|
||||
|
||||
/* We may have ungrabbed the pointer when space was released while
|
||||
* mouse was down, to be able to catch a GDK_BUTTON_RELEASE event.
|
||||
*/
|
||||
if (shell->grab_pointer)
|
||||
gimp_display_shell_pointer_ungrab (shell, event);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user