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
SDL_SetWindowFullscreen fails to switch to windowed.
ElChupacabra


Joined: 07 Jan 2014
Posts: 4
Hi!
I'm using SDL2.0.3, Mac OS X 10.8.5. I got that code:
Code:
SDL_SetWindowFullscreen(window, fullscreen ? SDL_WINDOW_FULLSCREEN : 0);

It works great when I switch from windowed to fullscreen but nothing happens when I try to go back to windowed mode. SDL_SetWindowFullscreen is always returning 0 so I have no idea what is wrong. I need some advice what should I do. Btw when I use SDL_WINDOW_FULLSCREEN_DESKTOP strange things happen... I got just small window (1024x768 is which I'm using) in the left bottom corner of screen and the rest of screen is black (the other monitor is also black).
SDL_SetWindowFullscreen fails to switch to windowed.
Jeffrey Carpenter
Guest

What does the output of SDL_GetError contain after making the call?

On 2014/03/ 27, at 11:18, ElChupacabra wrote:

Quote:
Hi!
I'm using SDL2.0.3, Mac OS X 10.8.5. I got that code:







Code:
SDL_SetWindowFullscreen(window, fullscreen ? SDL_WINDOW_FULLSCREEN : 0);

It works great when I switch from windowed to fullscreen but nothing happens when I try to go back to windowed mode. SDL_SetWindowFullscreen is always returning 0 so I have no idea what is wrong. I need some advice what should I do. Btw when I use SDL_WINDOW_FULLSCREEN_DESKTOP strange things happen... I got just small window (1024x768 is which I'm using) in the left bottom corner of screen and the rest of screen is black (the other monitor is also black).
_______________________________________________
SDL mailing list

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

Cheers,
Jeffrey Carpenter


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_SetWindowFullscreen fails to switch to windowed.
Andreas
Guest

On Thu, Mar 27, 2014 at 04:18:41PM +0000, ElChupacabra wrote:
Quote:
Hi!
I'm using SDL2.0.3, Mac OS X 10.8.5. I got that code:

Code:
SDL_SetWindowFullscreen(window, fullscreen ? SDL_WINDOW_FULLSCREEN : 0);


It works great when I switch from windowed to fullscreen but nothing
happens when I try to go back to windowed
mode. SDL_SetWindowFullscreen is always returning 0 so I have no
idea what is wrong. I need some advice what should I do. Btw when I
use SDL_WINDOW_FULLSCREEN_DESKTOP strange things happen... I got
just small window (1024x768 is which I'm using) in the left bottom
corner of screen and the rest of screen is black (the other monitor
is also black).

I recently updated my engine to use latest SDL2-2.0.3 and I can
confirm that this isn't working. I did test this on Mac OSX Mavericks
(10.9.2).

This can be tested in any of the test programs included with SDL2.

Fire up 'testsprite2' for example and toggleFullscreen using 'CTRL +
Enter'. Window -> Fullscreen works fine but not Fullscreen ->
windowed.

However, when toggling using 'ALT + Enter' it works fine. This mode
uses 'SDL_WINDOW_FULLSCREEN_DESKTOP'.

'CTRL + Enter' uses 'SDL_WINDOW_FULLSCREEN' mode.

Any Mac guru know what might cause this behavior?

--
Regards,
Andreas
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_SetWindowFullscreen fails to switch to windowed.
Jeffrey Carpenter
Guest

I can confirm this bug report as well, using SDL v2.0.3's test/testsprite2 on Mac OS X 10.9.2. I strongly suspect that this is a bug of some sort introduced in either 2.0.2 or 2.0.3.

I took a short look at src/video/cocoa/SDL_cocoawindow.m -- where some (all? I don't know!) of the recent changes have occurred with fullscreen toggles, but it all looks like greek to me, with nothing obvious jumping out at me. (Not surprisingly, I don't know anything about Cocoa's API).

One of you two care to file a bug report? :-)

Cheers,
Jeffrey Carpenter


On 2014/04/ 03, at 6:33, Andreas wrote:

Quote:
On Thu, Mar 27, 2014 at 04:18:41PM +0000, ElChupacabra wrote:
Quote:
Hi!
I'm using SDL2.0.3, Mac OS X 10.8.5. I got that code:

Code:
SDL_SetWindowFullscreen(window, fullscreen ? SDL_WINDOW_FULLSCREEN : 0);


It works great when I switch from windowed to fullscreen but nothing
happens when I try to go back to windowed
mode. SDL_SetWindowFullscreen is always returning 0 so I have no
idea what is wrong. I need some advice what should I do. Btw when I
use SDL_WINDOW_FULLSCREEN_DESKTOP strange things happen... I got
just small window (1024x768 is which I'm using) in the left bottom
corner of screen and the rest of screen is black (the other monitor
is also black).

I recently updated my engine to use latest SDL2-2.0.3 and I can
confirm that this isn't working. I did test this on Mac OSX Mavericks
(10.9.2).

This can be tested in any of the test programs included with SDL2.

Fire up 'testsprite2' for example and toggleFullscreen using 'CTRL +
Enter'. Window -> Fullscreen works fine but not Fullscreen ->
windowed.

However, when toggling using 'ALT + Enter' it works fine. This mode
uses 'SDL_WINDOW_FULLSCREEN_DESKTOP'.

'CTRL + Enter' uses 'SDL_WINDOW_FULLSCREEN' mode.

Any Mac guru know what might cause this behavior?

--
Regards,
Andreas
_______________________________________________
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_SetWindowFullscreen fails to switch to windowed.
Jeffrey Carpenter
Guest

Just letting you guys know that I went ahead and filed the bug report regarding the discussed issue -- https://bugzilla.libsdl.org/show_bug.cgi?id=2479

Cheers,
Jeffrey Carpenter

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_SetWindowFullscreen fails to switch to windowed.
Andreas
Guest

On Sat, Apr 05, 2014 at 03:37:56AM -0500, Jeffrey Carpenter wrote:
Quote:
Just letting you guys know that I went ahead and filed the bug
report regarding the discussed issue --
https://bugzilla.libsdl.org/show_bug.cgi?id=2479

Thanks.

I'll go ahead and create an account on BugZilla too so that I can help
fixing and submitting bugs in the future.

Cheers,

--
Regards,
Andreas
_______________________________________________
SDL mailing list

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