# HG changeset patch # User Patrice Mandin # Date 1184342956 0 # Node ID 57b017e6aebff41dc35ea638c5908d8554d7e58b # Parent eede31c0ca2021a61455bf5769eeffee4eabea14 Simplify setting window title diff -r eede31c0ca20 -r 57b017e6aebf src/video/gem/SDL_gemevents.c --- a/src/video/gem/SDL_gemevents.c Fri Jul 13 03:57:40 2007 +0000 +++ b/src/video/gem/SDL_gemevents.c Fri Jul 13 16:09:16 2007 +0000 @@ -167,16 +167,14 @@ /* 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; }