Unmanage compositor and windows when closing display

Instead of unmanaging when closing the display, which is closed when
closing the screen, unmanage them directly from meta_display_close().

https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:
Jonas Ådahl 2018-06-29 12:44:17 +02:00
parent cd8f4259be
commit 937a9853cd
3 changed files with 8 additions and 10 deletions

View File

@ -292,9 +292,8 @@ gboolean meta_display_open (void);
void meta_display_close (MetaDisplay *display, void meta_display_close (MetaDisplay *display,
guint32 timestamp); guint32 timestamp);
void meta_display_unmanage_windows_for_screen (MetaDisplay *display, void meta_display_unmanage_windows (MetaDisplay *display,
MetaScreen *screen, guint32 timestamp);
guint32 timestamp);
/* Utility function to compare the stacking of two windows */ /* Utility function to compare the stacking of two windows */
int meta_display_stack_cmp (const void *a, int meta_display_stack_cmp (const void *a,

View File

@ -981,6 +981,10 @@ meta_display_close (MetaDisplay *display,
display->closing += 1; display->closing += 1;
meta_compositor_unmanage (display->compositor);
meta_display_unmanage_windows (display, timestamp);
meta_prefs_remove_listener (prefs_changed_callback, display); meta_prefs_remove_listener (prefs_changed_callback, display);
meta_display_remove_autoraise_callback (display); meta_display_remove_autoraise_callback (display);
@ -2632,9 +2636,8 @@ meta_display_unmanage_screen (MetaDisplay *display,
} }
void void
meta_display_unmanage_windows_for_screen (MetaDisplay *display, meta_display_unmanage_windows (MetaDisplay *display,
MetaScreen *screen, guint32 timestamp)
guint32 timestamp)
{ {
GSList *tmp; GSList *tmp;
GSList *winlist; GSList *winlist;

View File

@ -797,10 +797,6 @@ meta_screen_free (MetaScreen *screen,
screen->closing += 1; screen->closing += 1;
meta_compositor_unmanage (screen->display->compositor);
meta_display_unmanage_windows_for_screen (display, screen, timestamp);
meta_prefs_remove_listener (prefs_changed_callback, screen); meta_prefs_remove_listener (prefs_changed_callback, screen);
meta_screen_ungrab_keys (screen); meta_screen_ungrab_keys (screen);