diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2011-01-25 08:49:33 -0500 |
---|---|---|
committer | Thomas Thurman <tthurman@gnome.org> | 2011-01-25 09:01:26 -0500 |
commit | 85aba1afe33d973bdea0229b534516c1658a44d5 (patch) | |
tree | 1a7f66d72bc76daea5b51676e08f874eaf33a8bf /src/core/display.c | |
parent | 25eb6ce67cbd416cd239db6c58e707e133a9a6df (diff) | |
download | metacity-85aba1afe33d973bdea0229b534516c1658a44d5.tar.gz |
Should set RestartStyleHint to RestartIfRunning when replaced
This reverts most of commit abbd057eb967e6ab462ffe305f41b2b04d417b25;
- It's fine to call meta_session_shutdown() after the display
is closed, since it's talking over the ICE connection
- We should not call warn_about_lame_clients_and_finish_interact()
unless we are interacting with the window manager in a session
save.
However, the part of abbd057 that fixed accessing freed memory was
fixing a real problem; this patches does the same thing in a simpler
way by fixing an obvious type in meta_display_close() where it was
NULL'ing out the local variable 'display' rather than the global
variable 'the_display' and adding keeping the check in meta_finalize()
that was added in abbd057.
The order of calling meta_session_shutdown() and
calling meta_display_close() is reverted back to the old order to
make it clear that it's OK if the display way already closed previously.
Diffstat (limited to 'src/core/display.c')
-rw-r--r-- | src/core/display.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/core/display.c b/src/core/display.c index e816823a..5f20cdf2 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -926,7 +926,7 @@ meta_display_close (MetaDisplay *display, meta_compositor_destroy (display->compositor); g_free (display); - display = NULL; + the_display = NULL; meta_quit (META_EXIT_SUCCESS); } @@ -4727,9 +4727,6 @@ process_selection_clear (MetaDisplay *display, screen, event->xselectionclear.time); - if (!display) - the_display = NULL; - /* display and screen may both be invalid memory... */ return; @@ -4751,12 +4748,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); @@ -4766,10 +4761,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 |