floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.53k stars 467 forks source link

sokol_app.h: request for show/hide/focus window functions #1030

Open edubart opened 2 months ago

edubart commented 2 months ago

This is a feature request for sokol_app to have more functions that gives more control its window on desktop, such as:

I saw a solution for this in https://github.com/floooh/sokol/issues/741 but it's for Linux only, would be nice to have a solution that cover major desktops environments (Linux, Windows, MacOS).

If someone already did extensions for this targeting other platforms (Windows, MacOS), please share the code snippet :)

floooh commented 2 months ago

Eventually I want to get more window controls like this into sokol_app.h, but currently it's not a high priority.

One cheap fix that would make sense in the short term is a similar function like sapp_win32_get_hwnd() and sapp_macos_get_window() for X11.

That would allow to workaround that limitation without having to write an "extension header" like detailed in #741.