sokol icon indicating copy to clipboard operation
sokol copied to clipboard

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

Open edubart opened this issue 2 months ago • 1 comments

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

  • show window
  • hide window
  • raise window focus
  • start application without window focus
  • start application with window hidden

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 :)

edubart avatar Apr 13 '24 11:04 edubart

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.

floooh avatar Apr 13 '24 12:04 floooh