mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Fix XI2 Scrolling Issue (#12603)
ref #11679 https://github.com/zed-industries/zed/pull/11235#issuecomment-2144727144 Filters leave events to ensure they are in the normal notify leave events (not grab or ungrab) ([spec](https://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt)). Confirmed to fix the issue @mrnugget was having. Release Notes: - linux: Fixed a regression that caused some X11 input devices being unable to scroll.
This commit is contained in:
parent
d0fa012bf8
commit
2b21c89e3c
@ -766,7 +766,7 @@ impl X11Client {
|
||||
valuator_idx += 1;
|
||||
}
|
||||
}
|
||||
Event::XinputLeave(event) => {
|
||||
Event::XinputLeave(event) if event.mode == xinput::NotifyMode::NORMAL => {
|
||||
self.0.borrow_mut().scroll_x = None; // Set last scroll to `None` so that a large delta isn't created if scrolling is done outside the window (the valuator is global)
|
||||
self.0.borrow_mut().scroll_y = None;
|
||||
|
||||
|
@ -261,8 +261,6 @@ impl X11WindowState {
|
||||
.event_mask(
|
||||
xproto::EventMask::EXPOSURE
|
||||
| xproto::EventMask::STRUCTURE_NOTIFY
|
||||
| xproto::EventMask::ENTER_WINDOW
|
||||
| xproto::EventMask::LEAVE_WINDOW
|
||||
| xproto::EventMask::FOCUS_CHANGE
|
||||
| xproto::EventMask::KEY_PRESS
|
||||
| xproto::EventMask::KEY_RELEASE,
|
||||
|
Loading…
Reference in New Issue
Block a user