openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
749 stars 359 forks source link

Weird title bar on unfocused borderless window #1779

Closed ACrazyTown closed 2 months ago

ACrazyTown commented 2 months ago

I'm having an issue with this weird title bar thing being visible for a split second on an unfocused borderless window. Here's a video of it on the SimpleImage demo (modified only to make the window borderless):

https://github.com/openfl/lime/assets/47027981/a4cd722e-0607-4068-8f84-e2190e92505f

You can see it show up sometimes for a very short amount of time after I click off the window. Weirdly enough, when testing with OpenFL, the title bar seems to stay visible for as long as the window is unfocused:

https://github.com/openfl/lime/assets/47027981/5cb084b5-ef13-4a7d-a4a2-226ee6d7ed35

It seems to happen on both Hashlink and Windows C++ targets. I'm using Lime 8.1.1, OpenFL 9.3.2 and Haxe 4.3.4 Is there a way to hide it?

ACrazyTown commented 2 months ago

I've narrowed this down to be an issue with SDL2 with this little demo:

Screenshot 2024-04-18 150015

I'm not completely sure but I think the issue got fixed in SDL3 as I'm unable to reproduce it so I guess this issue has to wait for #1684 to be merged first

Dimensionscape commented 2 months ago

@ACrazyTown It works fine if you set borderless ="true" in the project xml window tag for both hl and hxcpp.

We should probably disallow changing the borderless property at runtime.

Dimensionscape commented 2 months ago

Actually I think this is fixed in lime 8.2 from github, so you should be able to set the borderless property to true after the window is created.