Repository navigation
Conversation
- In meta_window_handle_mouse_grab_op_event(), prevent pointer motion events during active directional keyboard grabs from calling update_resize() or update_move(). Pointer warp and trackpad jitter were overriding the 10px keyboard resize increments with tiny 0px/1px mouse deltas. - In warp_grab_pointer(), guard meta_x11_error_trap_push() and meta_x11_error_trap_pop_with_return() with display->x11_display check to prevent a NULL pointer dereference crash when running in Wayland or nested modes. - In meta_window_wayland_finish_move_resize(), call meta_window_update_keyboard_resize() once the Wayland client commits its resized buffer so the pointer and grab anchor are updated to the actual new window bounds. Fixes linuxmint#871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #871
Summary
When using Alt + F8 (keyboard interactive resize grab), two issues occur under Wayland / nested sessions:
Wayland NULL dereference crash in
warp_grab_pointer():src/core/window.c:warp_grab_pointer(),meta_x11_error_trap_push(display->x11_display)andmeta_x11_error_trap_pop_with_return(display->x11_display)are called unconditionally.display->x11_displayisNULL, causing an immediateSIGSEGVcrash when initiating resize with Alt + F8.if (display->x11_display).Pointer motion events overriding 10px keyboard resize steps with 0px/1px jitter:
src/core/window.c:meta_window_handle_mouse_grab_op_event(),CLUTTER_MOTIONevents were not checking whether the active grab operation is a keyboard grab (meta_grab_op_is_keyboard).update_resize().update_resize()computeddx = x - grab_anchor_root_xand immediately overwrote the 10px keyboard increment with mouse deltas (often 0px or 1px), making resizing feel virtually stationary as if stuck on a 1px step.update_resize()/update_move().Wayland resize pointer tracking synchronization:
window->rectis only updated when the client attaches the new buffer inmeta_window_wayland_finish_move_resize().meta_window_update_keyboard_resize(window, FALSE)on buffer commit during keyboard resize grabs so that the pointer and grab anchor are warped and synchronized to the actual committed window dimensions.