The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Making a modal SDL window ?
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
I have an application that needs to display some SDL-loaded stuff, and read some SDL keystrokes when the user presses the “settings” button the main (non-SDL) window.

so I just make a new window :

window = SDL_CreateWindow(“Settings", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dialog_w, dialog_h, SDL_WINDOW_SHOWN);

and make a small event loop that does the necessary polling.

this all works find, but I want this window to be front-most at all time until the settings are canceled or saved

is there a way to do this ?


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Making a modal SDL window ?
Jonny D


Joined: 12 Sep 2009
Posts: 932
I know that the Win32 EnableWindow() can be used for this, but I don't know that it would keep the subwindow on top alone.

Jonny D


On Friday, July 24, 2015, jeroen clarysse wrote:
Quote:
I have an application that needs to display some SDL-loaded stuff, and read some SDL keystrokes when the user presses the “settings” button the main (non-SDL) window.

so I just make a new window :

        window = SDL_CreateWindow(“Settings", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dialog_w, dialog_h, SDL_WINDOW_SHOWN);

and make a small event loop that does the necessary polling.

this all works find, but I want this window to be front-most at all time until the settings are canceled or saved

is there a way to do this ?


_______________________________________________
SDL mailing list
[url=javascript:;][/url]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Making a modal SDL window ?
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
I think users will still be able to tab between windows or via utilities; On macOSX "cmd ~” would cycle between windows as well




Quote:
On 25 Jul 2015, at 01:35, Jonathan Dearborn wrote:

I know that the Win32 EnableWindow() can be used for this, but I don't know that it would keep the subwindow on top alone.

Jonny D


On Friday, July 24, 2015, jeroen clarysse wrote:
I have an application that needs to display some SDL-loaded stuff, and read some SDL keystrokes when the user presses the “settings” button the main (non-SDL) window.

so I just make a new window :

window = SDL_CreateWindow(“Settings", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dialog_w, dialog_h, SDL_WINDOW_SHOWN);

and make a small event loop that does the necessary polling.

this all works find, but I want this window to be front-most at all time until the settings are canceled or saved

is there a way to do this ?


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org