This commit is contained in:
QC 2015-09-27 13:26:18 +02:00
parent 838c838d31
commit 536fd9822c
1 changed files with 7 additions and 7 deletions

View File

@ -1503,13 +1503,6 @@ static void teardown ( int pfd )
// Release the window.
release_keyboard ( display );
if ( main_window != None ) {
XUnmapWindow ( display, main_window );
XDestroyWindow ( display, main_window );
main_window = None;
XDestroyIC ( xic );
XCloseIM ( xim );
}
if ( draw ) {
cairo_destroy ( draw );
draw = NULL;
@ -1518,6 +1511,13 @@ static void teardown ( int pfd )
cairo_surface_destroy ( surface );
surface = NULL;
}
if ( main_window != None ) {
XUnmapWindow ( display, main_window );
XDestroyWindow ( display, main_window );
main_window = None;
XDestroyIC ( xic );
XCloseIM ( xim );
}
if ( map != None ) {
XFreeColormap ( display, map );