# SDL 2.0 fullscreen mode won't work?

### #1SteveDeFacto

New Member

• Members
• 8 posts

Posted 13 August 2012 - 03:28 PM

When I try to go full screen the resolution changes but that is about it. The window border still shows and when I exist my application my desktop is still in that resolution. Is this because SDL 2.0 is not finished or do I have to do something else to make my window expand to fullscreen / manually exit fullscreen?

EDIT: Probably need to give more information. I'm using Ubuntu 12.04 and I've tried many things to fix the problem but nothing seems to work. I noticed that when the resolution of my desktop is already set to the resolution of the window the window will properly expand to fullscreen. Here is my how I create the window:

	SDL_Init(SDL_INIT_VIDEO);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_Window* window = SDL_CreateWindow("ContextWindow", 0, 0, 1024, 768, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN);


### #2AgentC

New Member

• Members
• 1 posts

Posted 21 October 2012 - 07:19 PM

You could try adding SDL_WINDOW_BORDERLESS to the flags. Also make sure you're using the latest head revision from the Mercurial repository. SDL 2.0 is certainly a work in progress; I remember they committed just recently some fixes to Linux fullscreen mode. As far as I'm aware SDL 2.0 is trying to be friendlier with the window managers and their various extensions, however that also makes fullscreen mode setup more errorprone.

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users