-
Notifications
You must be signed in to change notification settings - Fork 348
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
Wayland improvements #814
Wayland improvements #814
Conversation
Copy pasted from mako. I could not test.
eb7ecf2
to
dfd0309
Compare
Used for detecting if there is a fullscreen application open.
dfd0309
to
0f58899
Compare
Codecov Report
@@ Coverage Diff @@
## master #814 +/- ##
==========================================
- Coverage 59.64% 58.77% -0.87%
==========================================
Files 36 37 +1
Lines 5880 5963 +83
==========================================
- Hits 3507 3505 -2
- Misses 2373 2458 +85
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This code is for review ready now. You can test fullscreen detection only on the latest sway version. There is one edge case not being dealt with, namely two "toplevels" being fullscreen on the same output. It's possible according to the protocol, but I don't think it's possible in sway. |
I'm not sure about the touch support part. It's untested as you said, no-one has requested it yet. Doesn't wayland translate touch=left click? In which case I think leaving the default behaviour would be fine. |
I don't think wayland translates touch actions to left mouse button. That would mean it triggers twice on touch. Wouldn't make much sense in code. I feel like it can't hurt to leave the touch code in. |
My point is that my assumption for a sane default for wayland is:
Is that not the case? It seems weird that for all programs to work with touch they have to be explicitly coded for touch. |
I've asked on the wayland irc to be sure. It's not required by the spec to translate the touch inputs to left mouse button, thus some compositors might not do it. I don't know what compositors do or don't do it though. Most applications won't have to be explicitly coded for touch, because they are using a GUI toolkit like QT or GTK. The wayland protocol seems to be quite low level, so maybe it will eventually make sense to have libraries that do the wayland interfacing. You can't query things like mouse position, but you have to keep track of it with position change events. |
Hm, in that case lets try it out. (And hope it doesn't break anything) |
Fullscreen detection works with Sway 1.6 ? |
Yep |
Well, I'm trying not to have notifications shown when fullscreen, under X11 this line did that |
Could you open an issue about that with more info like a Dunst version included? |
This PR adds fullscreen detection for compositors that support the protocol (sway master does, but there is no release version that does yet). It also adds basic touchscreen handling copied from mako, although I haven't been able to test it since I don't have a touch device with linux.
Minor fix is made, where the idle timer would be set to 0 when idle_timeout was 0, instead of disabling the timer. This resulted in lots of debug messages.