Skip to content

Wayland improvements - #814

Merged
tsipinakis merged 4 commits into
dunst-project:masterfrom
fwsmit:wayland-improvements
Mar 8, 2021
Merged

Wayland improvements#814
tsipinakis merged 4 commits into
dunst-project:masterfrom
fwsmit:wayland-improvements

Conversation

@fwsmit

@fwsmit fwsmit commented Feb 2, 2021

Copy link
Copy Markdown
Member

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.

Copy pasted from mako. I could not test.
@fwsmit
fwsmit force-pushed the wayland-improvements branch 3 times, most recently from eb7ecf2 to dfd0309 Compare February 4, 2021 22:40
@fwsmit
fwsmit force-pushed the wayland-improvements branch from dfd0309 to 0f58899 Compare February 5, 2021 23:43
@fwsmit
fwsmit marked this pull request as ready for review February 5, 2021 23:44
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #814 (0f58899) into master (814e620) will decrease coverage by 0.86%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 58.77% <0.00%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/input.c 0.00% <0.00%> (ø)
...gn-toplevel-management-unstable-v1-client-header.h 0.00% <0.00%> (ø)
src/wayland/wl.c 0.00% <0.00%> (ø)
src/rules.c 47.76% <0.00%> (-1.50%) ⬇️
src/option_parser.c 86.06% <0.00%> (-0.04%) ⬇️
src/x11/x.c 2.32% <0.00%> (+0.02%) ⬆️
src/dunst.c 10.28% <0.00%> (+0.09%) ⬆️
src/notification.c 60.37% <0.00%> (+0.31%) ⬆️
src/log.c 79.06% <0.00%> (+1.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 814e620...0f58899. Read the comment docs.

@fwsmit

fwsmit commented Feb 5, 2021

Copy link
Copy Markdown
Member Author

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.

@fwsmit fwsmit mentioned this pull request Feb 8, 2021
@tsipinakis

Copy link
Copy Markdown
Member

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.

@fwsmit

fwsmit commented Feb 27, 2021

Copy link
Copy Markdown
Member Author

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.

@tsipinakis

Copy link
Copy Markdown
Member

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.

My point is that my assumption for a sane default for wayland is:

If (application supports touch) {
    send touch events
} else {
    send touch events as left click
}

Is that not the case? It seems weird that for all programs to work with touch they have to be explicitly coded for touch.

@fwsmit

fwsmit commented Mar 3, 2021

Copy link
Copy Markdown
Member Author

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.

@tsipinakis

Copy link
Copy Markdown
Member

Hm, in that case lets try it out. (And hope it doesn't break anything)

@tsipinakis
tsipinakis merged commit 3acffdb into dunst-project:master Mar 8, 2021
@kopr12

kopr12 commented Jun 24, 2021

Copy link
Copy Markdown

Fullscreen detection works with Sway 1.6 ?

@fwsmit

fwsmit commented Jun 24, 2021

Copy link
Copy Markdown
Member Author

Fullscreen detection works with Sway 1.6 ?

Yep

@fwsmit
fwsmit deleted the wayland-improvements branch June 24, 2021 14:41
@kopr12

kopr12 commented Jun 24, 2021

Copy link
Copy Markdown

Well, I'm trying not to have notifications shown when fullscreen, under X11 this line did that fullscreen = delay, doesn't seem to work under Wayland, do I need something else to configure as well ?

@fwsmit

fwsmit commented Jun 24, 2021

Copy link
Copy Markdown
Member Author

Could you open an issue about that with more info like a Dunst version included?

@codecov-commenter

codecov-commenter commented Mar 31, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 129 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.77%. Comparing base (814e620) to head (0f58899).
⚠️ Report is 953 commits behind head on master.

Files with missing lines Patch % Lines
src/wayland/wl.c 0.00% 120 Missing ⚠️
...gn-toplevel-management-unstable-v1-client-header.h 0.00% 6 Missing ⚠️
src/input.c 0.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            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     
Flag Coverage Δ
unittests 58.77% <0.00%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants