Clamp maximum notification width to screen width#973
Conversation
Codecov Report
@@ Coverage Diff @@
## master #973 +/- ##
==========================================
- Coverage 60.59% 60.17% -0.43%
==========================================
Files 44 44
Lines 6629 6785 +156
==========================================
+ Hits 4017 4083 +66
- Misses 2612 2702 +90
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Thank you for implementing this. I've actually implemented the wayland display size detection. I'll push that onto your branch and reword you commit message. |
6ee1ff8 to
9b03ec2
Compare
Avoid bleeding the notification window into other screens. This fixes a regression introduced with 208b967.
This stub resolution is only used when follow mode is used, since dunst cannot easily detect the active screen then. This works around having the notification cut off at 1080 pixels under Wayland with screens larger than 1080p, of which there are plenty in use nowadays. 4k UHD as a stub should suffice here for most cases.
9b03ec2 to
733efdb
Compare
Nice! Thanks for the fast response. |
|
I've tested it and it seems to work great. We may want to have some documentation about this for other people to use this feature. |
|
Unfortunately, I have too limited time at the moment to work around the integer parsing troubles in the config file. As of now with these commits, the notification width always gets clamped to current screen width. We could write a sentence or two in the manpages. Something like: What do you think? |
No problem, it's completely fine to leave it as is for now.
Yes, seems good. Could you add that to the man page, then I'll merge this PR :) |
|
I've added it to the man page, so I'll merge it after the checks are finished |
|
Merged, thanks for the fix |
|
Sorry, did not see your message in time. Good to see this merged! |
This fixes the notification bleeding into other screens as discussed in #951.
This fixes the main issue described in ticket for X11.
This code will work for Wayland eventually once
get_active_screenis implemented correctly inwl.c.For now we increase the stub resolution to a value which does not get exceeded with "common" screen resolutions.
Thanks an best regards