Can't FullScreen when setting SDL_windowid by putenv()

Hello,

Thanks for your time.

I developed my own dialog interface on Solaris system by using Motif toolkit.
And I display the image on the appointed window which I create by motif toolkit.
That is to say, I display the decoded image on the very window which can be
provided through a window’s handle (a widget) while not to use the popup window
created by SDL. I made this through following codes:

static char windowhack[32];

sprintf(windowhack, “SDL_windowid=%d”, XtWindow(myWidget));
putenv(windowhack);

It worked well! The image showing on the very window I created by motif toolkit.

But here is a question: I can’t make the image display on fullscreen. When I press
"FullScreen" button, the showing image is changed, and only for 1/4(up-left) of
the original image is still display in the very widget’s window, while not display
the image on entire screen.

Would anybody be kindly to give me some advice to implement the proper fullscreen
function when I use my own widget’s window to display the decoded image instead of
the window which created by SDL itself. How should I modify the corresponding codes
to settle down the problem?

I really appreciate your help!

Best Regards!

wind

I have done something similar using the FLTK toolkit. To get the fullscreen to
work I had to unset the environment variable “SDL_windowid” and then
reinitialise the SDL_Screen with the SDL_FULLSCREEN flag. When coming out of
fullscreen mode, just set the SDL_windowid environment variable and
reinitialise the SDL_Screen.

Conceptually, it’s similar to taking the SDL_Screen out of the widget, then
making it go fullscreen. When exiting fullscreen mode, the SDL_Screen is put
back inside the widget.

AlvinOn Tuesday 16 January 2007 09:10, gaofg wrote:


Would anybody be kindly to give me some advice to implement the proper
fullscreen function when I use my own widget’s window to display the
decoded image instead of the window which created by SDL itself. How should
I modify the corresponding codes to settle down the problem?