You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
winit 0.10.1/x11 render issue - top & right cut off #398
Today my projects are missing a small part of the top & right sections after updating to winit 0.10.1. This appears to only affect x11 (I tested in windows which was fine).
My projects are all affected using gfx/glutin, but this can also be reproduced by using gliumcargo update; cargo run --example image
winit 0.10.1 (cut off top & right)
winit =0.10.0 (expected)
Rendering is correct simply by adding winit = "=0.10.0" to the Cargo.toml
Window inner size of 400x300 was used for the screenshots
Increasing the border width makes this issue really noticeable.
(Add new_window pixel 20 in .i3/config)
This is a floating window with a 20px blue border:
I've just tested this on separate hardware too, running Ubuntu 16.04
I think this + @b-r-u's example shows this does indeed affect all x11 setups. We should probably revert 150d270. Are you able to produce this @jwilm?
I wonder if we can automate a regression test for this - an image comparison under xvfb perhaps? It'd be nice to have a headless test for all backends ideally.
@alexheretic The bug doesn't really show up on my machine because I only have 2 px borders, but there's no doubt it was introduced there. Rather than revert that commit, it would be reasonable to update that code to get the dimensions from the Window winit references and still return positioning data based on the most-parent window.
Activity
[-]winit 0.10.1/x11 render issue [/-][+]winit 0.10.1/x11 render issue - top & right cut off[/+]tomaka commentedon Feb 6, 2018
Probably an HiDPI issue.
alexheretic commentedon Feb 7, 2018
I've narrowed down the regression to being introduced with 150d270 (#386).
My hidpi_factor is
1before & after, so I don't think that is an issue.alexheretic commentedon Feb 7, 2018
This issue is present all x11 DE/WMs on my setup. It's least pronounced in i3, but there is still a difference (mostly the right cut off).
Gnome
KDE Plasma
Xfce
Mate
Budgie
i3
Note: I sized i3 manually
b-r-u commentedon Feb 7, 2018
i3
Increasing the border width makes this issue really noticeable.
(Add
new_window pixel 20in.i3/config)This is a floating window with a 20px blue border:
alexheretic commentedon Feb 7, 2018
I've just tested this on separate hardware too, running Ubuntu 16.04

I think this + @b-r-u's example shows this does indeed affect all x11 setups. We should probably revert 150d270. Are you able to produce this @jwilm?
I wonder if we can automate a regression test for this - an image comparison under xvfb perhaps? It'd be nice to have a headless test for all backends ideally.
Revert "Fix x11 Window::get_position wrong values (rust-windowing#386)"
jwilm commentedon Feb 7, 2018
@alexheretic The bug doesn't really show up on my machine because I only have 2 px borders, but there's no doubt it was introduced there. Rather than revert that commit, it would be reasonable to update that code to get the dimensions from the
Windowwinit references and still return positioning data based on the most-parent window.Fix x11 window size calculations
jwilm commentedon Feb 7, 2018
@alexheretic does #402 resolve this for you?
alexheretic commentedon Feb 7, 2018
@jwilm fair enough, yep I just checked it. Thanks for fixing this!
b-r-u commentedon Feb 7, 2018
This commit works for me, too.
alexheretic commentedon Feb 8, 2018
@tomaka We should merge #402 and release before closing this don't you think?
Fix x11 window size calculations (#402)
tomaka commentedon Feb 8, 2018
Whoops! Merging the PR is now done, closing the issue is ok even when not released.
Fix x11 window size calculations (rust-windowing#402)
Auto merge of rust-windowing#398 - pcwalton:gradient-fixes, r=pcwalton
Adding examples description (rust-windowing#398)