-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward XInput events #1807
Closed
Closed
Forward XInput events #1807
Conversation
This file contains 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
Events now get correctly propagated to a window (or root if none) behind conky. This was a necessary change to handle cases such as MATE+caja where caja is used between conky and background to show icons and desktop menu. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Atoms should be faster than graph traversal, and also don't include decorations (windows) inserted by WM/DEs, nor special 1x1 windows. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Causes input focus flickering, especially with WMs where focus follows pointer. This looks weird (carret flashing) and effectively acheives nothing. So I'm, leaving it up to WMs to manage focus. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
display_output_x11::main_loop_wait was getting long and hard to read. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
I think splitting it out into separate functions makes each part much clearer and easier to follow, as well as reducing the complexity of define conditions Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
✅ Deploy Preview for conkyweb canceled.
|
Caellian
force-pushed
the
dev/better-event-passing
branch
from
April 9, 2024 00:53
897a5c2
to
1a6a8e0
Compare
`BUILD_XINPUT` feature should use xinput instead of old X11 input events whenever possible. It's simpler to write now that it no longer makes main_loop_wait 100LoC larger. Also added proper valuator resolution by name, these values are mostly the same, but some devices might have unexpected indices. Ideally, names should also be configurable at runtime. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
dev/better-event-passing
branch
from
April 9, 2024 18:48
1a6a8e0
to
c244e3f
Compare
XSendEvent propagate bool argument is actually "don't force propagation", so True value means the event will only get propagated if it's not handled, and False means the event will _always_ get propagated. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Now handling mouse events on "override" windows with XInput which means that XInput allows us to fully support them on all window types. Previous commit contained a rough layout of everything needed, it's now been fixed (there were several bugs) and tested (Openbox). Added debounce to XInput events because they were getting reported twice with exact same data (including serial no.). Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Cookie pointer turns into nullptr (didn't free it) right before `propagate_x11_event` call somehow, so I'm deep-copying data to pass into propagation function. For now I'm only sending basic X11 events, have to figure out how to send XInput ones. Basic events need to be constructed anyway as we're blocking the surface below from recieving them. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Leaked from testing for unrelated issue. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
dev/better-event-passing
branch
from
April 11, 2024 06:03
14ebb44
to
dc0e056
Compare
Doesn't crash. Scrolling is wrong though (at least for me), because "Rel[ative]" valuators, with `Mode: relative` are in fact absolute. Propagation of constructed basic events works. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Events now get correctly propagated to a window (or root if none) behind conky. This was a necessary change to handle cases such as MATE+caja where caja is used between conky and background to show icons and desktop menu. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Atoms should be faster than graph traversal, and also don't include decorations (windows) inserted by WM/DEs, nor special 1x1 windows. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Causes input focus flickering, especially with WMs where focus follows pointer. This looks weird (carret flashing) and effectively acheives nothing. So I'm, leaving it up to WMs to manage focus. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
display_output_x11::main_loop_wait was getting long and hard to read. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
I think splitting it out into separate functions makes each part much clearer and easier to follow, as well as reducing the complexity of define conditions Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This commit is final refactor commit that's fully functional and contains fixes to old bugs and previously introduced regressions. There's some extra arguments (cookie) that aren't used yet, but will be in commits that succeed this one. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
fix/separate-x11-events
branch
from
April 12, 2024 05:48
f613160
to
57efc63
Compare
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This commit is final refactor commit that's fully functional and contains fixes to old bugs and previously introduced regressions. There's some extra arguments (cookie) that aren't used yet, but will be in commits that succeed this one. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
fix/separate-x11-events
branch
from
April 12, 2024 12:13
57efc63
to
cfdf5ac
Compare
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Move event handling code into separate functions.
Caellian
force-pushed
the
dev/better-event-passing
branch
from
April 12, 2024 23:15
f923045
to
3dd393f
Compare
Due to rewriting parts of the history of this branch, it's got a lot of diverging commits from main and it would be a lot of work trying to consolidate them into a common history. Created a new branch and PR (#1821), so I'm moving the development there. |
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.
This PR fixes propagation of mouse events to gdk applications (e.g. caja).
It builds on top of #1802.