[metacity] display: make meta_display_unmanage_windows_for_screen static
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] display: make meta_display_unmanage_windows_for_screen static
- Date: Sat, 4 Mar 2017 16:48:25 +0000 (UTC)
commit 29f75350e5f9032add1ada3797745b53fe317963
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Mar 3 23:49:46 2017 +0200
display: make meta_display_unmanage_windows_for_screen static
src/core/display-private.h | 4 ---
src/core/display.c | 45 ++++++++++++++++++++++---------------------
src/core/screen.c | 2 -
3 files changed, 23 insertions(+), 28 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 6f34249..a83e0d8 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -312,10 +312,6 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
void meta_display_grab (MetaDisplay *display);
void meta_display_ungrab (MetaDisplay *display);
-void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
- MetaScreen *screen,
- guint32 timestamp);
-
/* Utility function to compare the stacking of two windows */
int meta_display_stack_cmp (const void *a,
const void *b);
diff --git a/src/core/display.c b/src/core/display.c
index dee2ae0..22b3b47 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -782,6 +782,27 @@ meta_display_list_windows (MetaDisplay *display,
return winlist;
}
+static void
+meta_display_unmanage_windows (MetaDisplay *display,
+ guint32 timestamp)
+{
+ GSList *tmp;
+ GSList *winlist;
+
+ winlist = meta_display_list_windows (display, META_LIST_INCLUDE_OVERRIDE_REDIRECT);
+ winlist = g_slist_sort (winlist, meta_display_stack_cmp);
+
+ /* Unmanage all windows */
+ tmp = winlist;
+ while (tmp != NULL)
+ {
+ meta_window_free (tmp->data, timestamp);
+
+ tmp = tmp->next;
+ }
+ g_slist_free (winlist);
+}
+
void
meta_display_close (MetaDisplay *display,
guint32 timestamp)
@@ -811,6 +832,8 @@ meta_display_close (MetaDisplay *display,
event_callback,
display);
+ meta_display_unmanage_windows (display, timestamp);
+
if (display->screen != NULL)
{
meta_screen_free (display->screen, timestamp);
@@ -5076,28 +5099,6 @@ process_selection_clear (MetaDisplay *display,
}
}
-void
-meta_display_unmanage_windows_for_screen (MetaDisplay *display,
- MetaScreen *screen,
- guint32 timestamp)
-{
- GSList *tmp;
- GSList *winlist;
-
- winlist = meta_display_list_windows (display, META_LIST_INCLUDE_OVERRIDE_REDIRECT);
- winlist = g_slist_sort (winlist, meta_display_stack_cmp);
-
- /* Unmanage all windows */
- tmp = winlist;
- while (tmp != NULL)
- {
- meta_window_free (tmp->data, timestamp);
-
- tmp = tmp->next;
- }
- g_slist_free (winlist);
-}
-
int
meta_display_stack_cmp (const void *a,
const void *b)
diff --git a/src/core/screen.c b/src/core/screen.c
index dc13b46..5564bd7 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -636,8 +636,6 @@ meta_screen_free (MetaScreen *screen,
meta_compositor_unmanage (display->compositor);
- meta_display_unmanage_windows_for_screen (display, screen, timestamp);
-
meta_prefs_remove_listener (prefs_changed_callback, screen);
meta_screen_ungrab_keys (screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]