We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 660 - Fullscreen broken
Summary: Fullscreen broken
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: x86 Windows Vista
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-01 14:38 UTC by Will
Modified: 2011-03-11 18:26 UTC (History)
1 user (show)

See Also:


Attachments
Test program (1.98 KB, text/plain)
2010-01-27 18:49 UTC, Will
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will 2009-01-01 14:38:51 UTC
I'm running on Windows Vista and my OpenGL enabled window wont switch to full screen mode from windowed mode. Instead it stays windowed and doesn't report re-size events until I exit full screen mode. (It used to work when I was using SDL-1.2)
Comment 1 Sam Lantinga 2009-12-13 22:58:20 UTC
I've put in the first pass of fullscreen support for SDL 1.3.  Can you try this with the latest snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 2 Will 2009-12-15 11:53:12 UTC
(In reply to comment #1)
> I've put in the first pass of fullscreen support for SDL 1.3.  Can you try this
> with the latest snapshot?
> http://www.libsdl.org/tmp/SDL-1.3.zip
> 
> Thanks!

Hey that's great to hear! I am currently preparing for my finals next week but after that I will be glad to give it another shot (Don't have working code to test it ATM).
Comment 3 Sam Lantinga 2010-01-26 21:23:55 UTC
Any luck with this yet?
Comment 4 Will 2010-01-27 18:49:55 UTC
Created attachment 482 [details]
Test program
Comment 5 Will 2010-01-27 18:54:56 UTC
(In reply to comment #3)
> Any luck with this yet?

I whipped up this test program in Code::Blocks on windows to see if it works. it appears if i initialize it to full screen that it does work but I still cannot seem to switch it between windowed mode and back.

When running the program, pressing the space bar is supposed switch it to full screen and back.

This isn't the code I was using when I found the bug so I hope its ok.
Comment 6 Lubosz 2010-09-06 06:41:33 UTC
I can confirm this bug on Ubuntu 10.04 64bit with latest SDL from hg.

NVIDIA 256.52 stable driver
kernel 2.6.32-25
X.Org X Server 1.7.6

I also have this issue on my 64bit archlinux X server 1.9 and kernel 2.6.35.

Fullscreen works from initialisation:
flags |= SDL_WINDOW_FULLSCREEN;

But the SDL_SetWindowFullscreen is buggy.
When I set the window resolution to my native resolution, it does nothing.
It changes the resolution, if different, but does not have a fullscreen window.
Comment 7 Nathaniel J Fries 2011-01-06 13:41:26 UTC
Fullscreen works on Windows 7 Home Ultimate 64-bit, tested just now.
Has this been fixed, or is it a bug exclusively on Vista?
Comment 8 Nathaniel J Fries 2011-01-06 19:37:31 UTC
(In reply to comment #7)
> Fullscreen works on Windows 7 Home Ultimate 64-bit, tested just now.
> Has this been fixed, or is it a bug exclusively on Vista?

Sorry, I only tested on creating fullscreen. Setting fullscreen later is still broken.
Comment 9 Nathaniel J Fries 2011-01-07 08:28:22 UTC
(In reply to comment #7)
> Fullscreen works on Windows 7 Home Ultimate 64-bit, tested just now.
> Has this been fixed, or is it a bug exclusively on Vista?

Sorry, I only tested on creating fullscreen. Setting fullscreen later is still broken.(In reply to comment #8)
> (In reply to comment #7)
> > Fullscreen works on Windows 7 Home Ultimate 64-bit, tested just now.
> > Has this been fixed, or is it a bug exclusively on Vista?
> 
> Sorry, I only tested on creating fullscreen. Setting fullscreen later is still
> broken.

Also, initializing fullscreen and switching to normal later doesn't work quite right, either (at least not on Windows 7).

In SDL_SetWindowFullscreen, nothing is actually changed on the window except its flags. The calls to SDL_UpdateFullscreenMode only serve to minimize other fullscreen windows and change the display mode as required; it doesn't make the window fullscreen either.

I think each video bootstrap will require a function to switch to fullscreen and back to resolve this issue properly.
Comment 10 Sam Lantinga 2011-02-16 03:39:03 UTC
I've done a bunch of work on fullscreen mode handling in the latest snapshot:
http://www.libsdl.org/tmp/SDL-1.3.zip

Can you give it a look and see if your bug is fixed?

Thanks!
Comment 11 Will 2011-02-16 09:57:00 UTC
(In reply to comment #10)
> I've done a bunch of work on fullscreen mode handling in the latest snapshot:
> http://www.libsdl.org/tmp/SDL-1.3.zip
> 
> Can you give it a look and see if your bug is fixed?
> 
> Thanks!

Works great when starting from windowed mode now but when I create a window with the SDL_WINDOW_FULLSCREEN flag and try to go out of it stays fullscreen but the drawing area shrinks to the size of the would be window with other applications behind it being unclickable.

    --Bill
Comment 12 Will 2011-02-16 10:11:50 UTC
(In reply to comment #10)
> I've done a bunch of work on fullscreen mode handling in the latest snapshot:
> http://www.libsdl.org/tmp/SDL-1.3.zip
> 
> Can you give it a look and see if your bug is fixed?
> 
> Thanks!

Also looks like when starting from windowed mode switching to fullscreen and back does not preserve the original size of the window.

    --Bill
Comment 13 Lubosz 2011-02-17 03:02:47 UTC
Fullscreen changing works during runtime for me now on current hg.
Tested on Archlinux, current Nivida driver, OpenGL 3 context.
Thanks for fixing this. :)