Skip to content

x11: fixes for dpi scaling#965

Merged
fwsmit merged 2 commits intodunst-project:masterfrom
fwsmit:fractional-scale-fix
Nov 8, 2021
Merged

x11: fixes for dpi scaling#965
fwsmit merged 2 commits intodunst-project:masterfrom
fwsmit:fractional-scale-fix

Conversation

@fwsmit
Copy link
Member

@fwsmit fwsmit commented Nov 3, 2021

This may solve issue with incorrect window sizes.
It also fixes mouse position calculations. So the correct notification will be closed again when clicking on it.

Fixes: #950 #966

This may solve issue with incorrect window sizes
@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2021

Codecov Report

Merging #965 (87865ed) into master (7aa5adc) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #965      +/-   ##
==========================================
- Coverage   60.34%   60.32%   -0.02%     
==========================================
  Files          42       42              
  Lines        6415     6417       +2     
==========================================
  Hits         3871     3871              
- Misses       2544     2546       +2     
Flag Coverage Δ
unittests 60.32% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/draw.c 0.97% <0.00%> (ø)
src/x11/x.c 0.00% <0.00%> (ø)

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 7aa5adc...87865ed. Read the comment docs.

@fwsmit fwsmit changed the title draw: round calculated text size up x11: fixes for dpi scaling Nov 3, 2021
@vpont
Copy link
Contributor

vpont commented Nov 5, 2021

Is it enough to fix the text dimensions? I mean, there are other elements that depend on the scale, like icon dimensions, alignments, etc which also use round()

@fwsmit fwsmit merged commit 45c7c12 into dunst-project:master Nov 8, 2021
@fwsmit fwsmit deleted the fractional-scale-fix branch November 8, 2021 10:20
@fwsmit
Copy link
Member Author

fwsmit commented Nov 14, 2021

Is it enough to fix the text dimensions? I mean, there are other elements that depend on the scale, like icon dimensions, alignments, etc which also use round()

Probably not, but I don't want to risk breaking notifications with random ceils.

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.

Notification window wrongly sized

3 participants