Skip to content
Permalink
Browse files

Simplify setting window title

  • Loading branch information
pmandin committed Jul 13, 2007
1 parent 29678fd commit 6c2dde04f310ca2c80ab36b182451bf8068303ae
Showing with 8 additions and 10 deletions.
  1. +8 −10 src/video/gem/SDL_gemevents.c
@@ -167,16 +167,14 @@ void GEM_PumpEvents(_THIS)

/* Refresh window name ? */
if (GEM_refresh_name) {
if ( SDL_GetAppState() & SDL_APPACTIVE ) {
/* Fullscreen/windowed */
if (GEM_title_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
}
} else {
/* Iconified */
if (GEM_icon_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
}
const char *window_name =
(SDL_GetAppState() & SDL_APPACTIVE)
? GEM_title_name : GEM_icon_name;
if (window_name) {
wind_set(GEM_handle,WF_NAME,
(short)(((unsigned long)window_name)>>16),
(short)(((unsigned long)window_name) & 0xffff),
0,0);
}
GEM_refresh_name = SDL_FALSE;
}

0 comments on commit 6c2dde0

Please sign in to comment.