Skip to content
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

[linux] Desktop scaling causes strange window behavior #350

Closed
mythmon opened this issue Jun 15, 2019 · 2 comments · Fixed by #452
Closed

[linux] Desktop scaling causes strange window behavior #350

mythmon opened this issue Jun 15, 2019 · 2 comments · Fixed by #452

Comments

@mythmon
Copy link

mythmon commented Jun 15, 2019

I'm running Wayland on Fedora 30. I am using 150% scaling on my display. Running the simple_draw example looks like this:

image

It produces a largish window that is semi-transparent and blurred, with the actual content taking up only the top quarter of the screen. The mouse cursor seems to react to the entire width of the blurred window.

I can sort of resize the window. The toolbar changes size, and the art work change a bit. The blurry section doesn't resize at all. I can move the entire thing.

Other examples that I checked do this as well, namely vk_teapot and simple_ui.

I tested this with desktop scaling of 100%, 125%, 150%, and 200%. Only 100% looks correct, all non-100% scales have this exact problem.

@mitchmindtree
Copy link
Member

Hi @mythmon, thanks for the report!

Yes I'm actually running into this issue myself as a Gnome+Wayland user (though I'm on Arch) and I think you're right, this seems to have something to do with scaling compensation for DPI on Wayland. Nannou uses the winit library under the hood for handling windowing, and it uses the vulkano-win library for integrating vulkan and winit together. I'm not sure whether the issue lies in winit or vulkano-win, but I'm 99% sure the fix lies in one of these repos.

One quick test I've been meaning to do is to check if the issue still occurs when opening a winit window with an OpenGL context instead (e.g. running one of the conrod glium backend examples) and seeing if the issue still occurs. If it does, then the fix lies in winit, otherwise the problem is likely in vulkano-win.

Sorry about the issue! I'll do some more investigating next I get the chance as I too would love this solved.

@SlavojZizekIsASnack
Copy link

Something similar happens on sway, a wayland tiling window manager, and I would assume it also happens on X11 tiling window managers. There is a winit issue about opening up for a hint to open the window as floating instead of as tiled: rust-windowing/winit#862

It looks like this:

s

Using the fix proposed in the issue would make it look like this:

s

@mitchmindtree mitchmindtree changed the title Desktop scaling causes strange window behavior [linux] Desktop scaling causes strange window behavior Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants