Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Only install/uninstall the colormap if we've created a DirectColor co…
Browse files Browse the repository at this point in the history
…lormap.
  • Loading branch information
slouken committed Oct 11, 2012
1 parent d755b57 commit ad7cbfb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -993,11 +993,13 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
X11_SetNetWMState(_this, data->xwindow, flags);
}

if( fullscreen ) {
XInstallColormap(display, data->colormap);
} else {
XUninstallColormap(display, data->colormap);
}
if (data->visual->class == DirectColor) {
if ( fullscreen ) {
XInstallColormap(display, data->colormap);
} else {
XUninstallColormap(display, data->colormap);
}
}

XFlush(display);
}
Expand Down

0 comments on commit ad7cbfb

Please sign in to comment.