Borderless Mining

Borderless Mining

4M Downloads

Use GLFW_AUTO_ICONIFY with GLFW's fullscreen on Linux

vlad2305m opened this issue ยท 10 comments

commented

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

commented

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.

commented

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)

commented

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?

commented

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.

commented

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.

commented

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!

commented

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.

commented

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?

commented

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.

commented

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)