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

Use GLFW_AUTO_ICONIFY with GLFW's fullscreen on Linux #64

Open
vlad2305m opened this issue Mar 4, 2023 · 10 comments
Open

Use GLFW_AUTO_ICONIFY with GLFW's fullscreen on Linux #64

vlad2305m opened this issue Mar 4, 2023 · 10 comments
Labels
enhancement New feature or request linux Linux-only issues

Comments

@vlad2305m
Copy link

Linux KDE has a much better compositor and all support by default, so this mod should be disabled.
Why not make it only enabled on Windows, the only place where it is needed anyway?
Or maybe turn it off on non-windows by default so that people don't struggle with the hotkey not working corectly in some modpacks

@comp500
Copy link
Owner

comp500 commented Mar 5, 2023

Does it work with multiple monitors on KDE? I was under the impression that clicking out of the Minecraft window in vanilla causes it to minimise on both Windows and Linux, so this mod is still useful for multiple-monitor setups even when the compositor doesn't give exclusive display access.

@vlad2305m
Copy link
Author

I have 2 monitors and I can click outside minecraft without it minimising. Actually, when this mod is enabled, it "fullscreens" without covering the action bar, and if I fullscreen the window in the compositor, F11 just does nothing. I am using kwin on wayland if that helps. (Osu!lazer minimizes on lost focus, so I think Minecraft never intended to in the first place)

@comp500
Copy link
Owner

comp500 commented Mar 5, 2023

That's... interesting. Without Borderless Mining, GLFW should always minimise on lost focus if GLFW_AUTO_ICONIFY is set (it's set by default, and not disabled by Minecraft), so unless KWin is lying to it or there's some Xwayland shenanigans I don't know why it wouldn't minimise.

@OffsetMonkey538 @CorneliusCornbread how well does vanilla fullscreen work on your setups?

@vlad2305m
Copy link
Author

Oh. I see what you mean. Indeed, if I make minecraft fullscreen from within minecraft, it will minimize. But I have a system-wide shortcut for making apps fullscreen, which I use instead because it works on any app. Granted, it tells everybody but minecraft that it's fullscreen.

@CorneliusCornbread
Copy link

That's... interesting. Without Borderless Mining, GLFW should always minimise on lost focus if GLFW_AUTO_ICONIFY is set (it's set by default, and not disabled by Minecraft), so unless KWin is lying to it or there's some Xwayland shenanigans I don't know why it wouldn't minimise.

@OffsetMonkey538 @CorneliusCornbread how well does vanilla fullscreen work on your setups?

Vanilla fullscreen works perfectly fine, it just won't stay open when selecting other windows on other monitors.

@comp500
Copy link
Owner

comp500 commented Mar 5, 2023

I wonder if a good strategy then would just be to disable GLFW_AUTO_ICONIFY on Linux, rather than using the technique Borderless Mining currently uses on Windows. Should solve #54 as well!

@vlad2305m
Copy link
Author

It would be wonderful, because afaik only Windows has composting problems with fullscreen apps like not showing second monitor, and that default setting looks like a bad solution made specifically for Windows.

@comp500 comp500 changed the title Enabled on linux KDE by default Use GLFW_AUTO_ICONIFY with GLFW's fullscreen on Linux Mar 17, 2023
@comp500 comp500 added enhancement New feature or request linux Linux-only issues labels Mar 17, 2023
@dolphin-cat
Copy link

Oh. I see what you mean. Indeed, if I make minecraft fullscreen from within minecraft, it will minimize. But I have a system-wide shortcut for making apps fullscreen, which I use instead because it works on any app. Granted, it tells everybody but minecraft that it's fullscreen.

can you share the code pls?

@vlad2305m
Copy link
Author

vlad2305m commented May 1, 2023

There is no code. It is Settings -> Shortcuts -> KWin -> Make Window Fullscreen (on KDE Plasma Wayland v 5.27.2)
I have no intention to read KDE's repository. If you want any debug info, I can run your debug jar.

@Lamdarer
Copy link

Thanks, alternatively it is possible to set a Windowrule to automatically make Minecraft fullscreen 'Settings'-> Workspace>Windowmanagement->Windowrules->New and than catch the window, set Windowclass to apply if "minecraft*" is included and Fullscreen to "Yes".
Now it should always do the trick.
I also set Windowtitel to unimportant "Minecraft*" (Note I used the ATlauncher so the naming could differ if you use something else, but the windowrules are mostly intuitive via the GUI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request linux Linux-only issues
Projects
None yet
Development

No branches or pull requests

5 participants