Hello Defold Community,
Is there a way to have an undecorated (borderless) non-fullscreen window on desktop environments? I have searched the API and also come across DefOS, but I did not see a way of doing it with that library.
Thank you.
Hello Defold Community,
Is there a way to have an undecorated (borderless) non-fullscreen window on desktop environments? I have searched the API and also come across DefOS, but I did not see a way of doing it with that library.
Thank you.
Hmm, I would have thought that DefOS had this featureā¦ Maybe there is a feature request? If not, perhaps you could create one?
@morikosm welcome to the community!
Do you mean something like this?
If so, I will create a PR that adds this functionality (need to refactor it first + I have only Windows implementation for now)
@Pawel , yes that is exactly what Iād like, as Iād like my game to load up with an undecorated window and to manage the window size from within the game options. If you would be so kind as to make a PR, it would be greatly appreciated.
Implementation (Windows only) is here:
I also created a PR for @Pkeodās defos main repo:
For HTML5 - I donāt think it even makes any sense? There is no border, caption to hide.
For Linux - I believe X11 could be used to modify window property. Some usage of XChangeProperty
.
For Mac - I donāt know, but googled up āCocoaā. I donāt have any apple device though to test even.
Some searching online implies it should be as easy as:
glfwSetWindowAttrib(handle, GLFW_DECORATED, GLFW_FALSE);
Though there isnāt a way to get a GLFW window handle or access this function with just the public dmSDK.
https://www.glfw.org/docs/3.3/window_guide.html#window_hints_wnd
The lack of a public dmSDK function for this was also an issue when I investigated how to make a game like Rustyās Retirement. It requires: borderless window, window always on top, and transparent window areas where mouse clicks fall through.
If the dmSDK API were to be opened up so that you can configure how the window and graphics context are created, it would be nice to have it provide enough access so that you could do all the above.
Weāve mostly been waiting for our upgrade to glfw3. We only have Linux left, then we can start looking at using glfwās own functions for this.