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 1153

Summary: [Linux] Fullscreen window not going fullscreen
Product: SDL Reporter: Jesse Anders <jesseanders>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, jesseanders
Version: HG 2.0   
Hardware: x86   
OS: Linux   
Attachments: Fix to allow fullscreen to work with compiz

Description Jesse Anders 2011-02-26 10:14:23 UTC
Creating a fullscreen window doesn't appear to be working correctly. Here's the test program I'm using (error-checking has been removed for brevity):

--------

#include "SDL.h"

int main(int, char*[])
{
    SDL_Init(SDL_INIT_EVERYTHING);
    SDL_Window* window = SDL_CreateWindow(
        "", 0, 0, 1280, 1024, SDL_WINDOW_FULLSCREEN | SDL_WINDOW_SHOWN);

    bool quit = false;
    while (!quit) {
        SDL_Event event;
        while (SDL_PollEvent(&event)) {
            if (event.type == SDL_KEYDOWN || event.type == SDL_QUIT) {
                quit = true;
            }
        }
    }

    SDL_DestroyWindow(window);
    SDL_Quit();

    return 0;
}

--------

Everything succeeds and the window is created, but not at fullscreen; the taskbar and menu bar are still visible, and clicking on the window's title bar causes the window to minimize.

This is with Ubuntu 10.10. (It looks like there are some related bugs in the database, but I'm not sure if they're exactly the same.)

Let me know if you need any other info.
Comment 1 Edward Rudd 2012-09-25 19:14:07 UTC
Created attachment 958 [details]
Fix to allow fullscreen to work with compiz

This issue is entirely related to Compiz and it's "odd" way of handling fullscreen..  Basically it refuses to allow a window to go fullscreen unless the window is resizeable. This attached patch checks for that scenario and enables/disabled re-sizing when going into/out of fullscreen mode.
Comment 2 Ryan C. Gordon 2012-09-27 11:12:56 UTC
(In reply to comment #1)
> Created attachment 958 [details]
> Fix to allow fullscreen to work with compiz

Something like this patch is now hg changeset ebe165c00fab, thanks!

--ryan.