diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/display-private.h | 2 | ||||
-rw-r--r-- | src/core/display.c | 15 | ||||
-rw-r--r-- | src/core/main.c | 5 | ||||
-rw-r--r-- | src/core/session.c | 8 |
4 files changed, 7 insertions, 23 deletions
diff --git a/src/core/display-private.h b/src/core/display-private.h index c59c5e19..6d3807a6 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -342,7 +342,7 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display, void meta_display_grab (MetaDisplay *display); void meta_display_ungrab (MetaDisplay *display); -void meta_display_unmanage_screen (MetaDisplay **display, +void meta_display_unmanage_screen (MetaDisplay *display, MetaScreen *screen, guint32 timestamp); diff --git a/src/core/display.c b/src/core/display.c index 647581f5..f07a4e69 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -936,7 +936,7 @@ meta_display_close (MetaDisplay *display, meta_compositor_destroy (display->compositor); g_free (display); - display = NULL; + the_display = NULL; meta_quit (META_EXIT_SUCCESS); } @@ -4954,13 +4954,10 @@ process_selection_clear (MetaDisplay *display, meta_verbose ("Got selection clear for screen %d on display %s\n", screen->number, display->name); - meta_display_unmanage_screen (&display, + meta_display_unmanage_screen (display, screen, event->xselectionclear.time); - if (!display) - the_display = NULL; - /* display and screen may both be invalid memory... */ return; @@ -4982,11 +4979,10 @@ process_selection_clear (MetaDisplay *display, } void -meta_display_unmanage_screen (MetaDisplay **displayp, +meta_display_unmanage_screen (MetaDisplay *display, MetaScreen *screen, guint32 timestamp) { - MetaDisplay *display = *displayp; meta_verbose ("Unmanaging screen %d on display %s\n", screen->number, display->name); @@ -4997,10 +4993,7 @@ meta_display_unmanage_screen (MetaDisplay **displayp, display->screens = g_slist_remove (display->screens, screen); if (display->screens == NULL) - { - meta_display_close (display, timestamp); - *displayp = NULL; - } + meta_display_close (display, timestamp); } void diff --git a/src/core/main.c b/src/core/main.c index 38c69b0a..94d56917 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -362,12 +362,11 @@ static void meta_finalize (void) { MetaDisplay *display = meta_get_display(); - - meta_session_shutdown (); - if (display) meta_display_close (display, CurrentTime); /* I doubt correct timestamps matter here */ + + meta_session_shutdown (); } static int sigterm_pipe_fds[2] = { -1, -1 }; diff --git a/src/core/session.c b/src/core/session.c index 80d22365..232d818c 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -381,14 +381,6 @@ meta_session_shutdown (void) SmProp *props[1]; char hint = SmRestartIfRunning; - if (!meta_get_display ()) - { - meta_verbose ("Cannot close session because there is no display"); - return; - } - - warn_about_lame_clients_and_finish_interact (FALSE); - if (session_connection == NULL) return; |