Kir-Antipov / cubes-without-borders

A mod that allows you to play Minecraft in a borderless fullscreen window
MIT License
18 stars 8 forks source link

--borderless tag dont work with DarkTitleBar #1

Closed Rozbiynk closed 8 months ago

Rozbiynk commented 9 months ago

Hi, im using mod version 1.1.0 on minecraft 1.20.1 If i use --borderless tag in start arguments it still dont open as borderless window изображение Im using prism launcher, so i think it may be issue here is log if it contain anything useful https://mclo.gs/WZ2Oe0n

Rozbiynk commented 8 months ago

issue was in DarkTitleBar

Kir-Antipov commented 8 months ago

I'm glad that the issue has resolved itself :D

So, does the conflict with "DarkTitleBar" only ruin the startup flag functionality? Or the borderless mode doesn't work at all?

Rozbiynk commented 8 months ago

it prevent minecraft to launch in borderless mode, but if you manually set it in settings everything is okay. I think you may need put it in mod description

Kir-Antipov commented 8 months ago

The problem is this piece of code on the DarkTitleBar's side:

// this is a very hacky way to invalidate the title bar, so it appears as dark correctly
// without having the user resize the window
int oldWidth = w.getWidth();
w.setWindowedSize(oldWidth + 2, w.getHeight());
w.setWindowedSize(oldWidth, w.getHeight());

This by-design forces the window out of the borderless fullscreen mode. So, I would suggest the author of that mod to find a less hacky way of invalidating the title bar :D