summaryrefslogtreecommitdiffstats
path: root/no-lame-dialog.patch
blob: fbba20619e24062fe05b389533d0a9f2100868ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
--- metacity-2.27.0/src/core/session.c	2009-02-20 10:26:32.000000000 -0500
+++ hacked/src/core/session.c	2009-06-07 23:46:25.927041281 -0400
@@ -82,7 +82,7 @@
 static char*       load_state         (const char *previous_save_file);
 static void        regenerate_save_file (void);
 static const char* full_save_file       (void);
-static void        warn_about_lame_clients_and_finish_interact (gboolean shutdown);
+static void        finish_interact (gboolean shutdown);
 
 /* This is called when data is available on an ICE connection.  */
 static gboolean
@@ -382,7 +382,7 @@
       return;
     }
 
-  warn_about_lame_clients_and_finish_interact (FALSE);
+  finish_interact (FALSE);
 
   if (session_connection == NULL)
     return;
@@ -584,7 +584,7 @@
 
   current_state = STATE_DONE_WITH_INTERACT;
 
-  warn_about_lame_clients_and_finish_interact (shutdown);
+  finish_interact (shutdown);
 }
 
 static void
@@ -1724,13 +1724,6 @@
   return full_save_path;
 }
 
-static int
-windows_cmp_by_title (MetaWindow *a,
-                      MetaWindow *b)
-{
-  return g_utf8_collate (a->title, b->title);
-}
-
 static void
 finish_interact (gboolean shutdown)
 {
@@ -1742,89 +1735,4 @@
     }
 }
 
-static void
-sigchld_handler (MetaNexus *nexus, guint arg1, gpointer arg2, gpointer user_data)
-{
-  gboolean shutdown = GPOINTER_TO_INT (user_data);
-
-  if (arg1 == 0) /* pressed "OK" */
-    {
-      finish_interact (shutdown);
-    }
-}
-
-static void
-warn_about_lame_clients_and_finish_interact (gboolean shutdown)
-{
-  GSList *lame = NULL;
-  GSList *windows;
-  GSList *lame_details = NULL;
-  GSList *tmp;
-  GSList *columns = NULL;
-  
-  windows = meta_display_list_windows (meta_get_display ());
-  tmp = windows;
-  while (tmp != NULL)
-    {
-      MetaWindow *window;
-          
-      window = tmp->data;
-
-      /* only complain about normal windows, the others
-       * are kind of dumb to worry about
-       */
-      if (window->sm_client_id == NULL &&
-          window->type == META_WINDOW_NORMAL)
-        lame = g_slist_prepend (lame, window);
-          
-      tmp = tmp->next;
-    }
-      
-  g_slist_free (windows);
-  
-  if (lame == NULL)
-    {
-      /* No lame apps. */
-      finish_interact (shutdown);
-      return;
-    }
-
-  columns = g_slist_prepend (columns, "Window");
-  columns = g_slist_prepend (columns, "Class");
-
-  lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
-
-  tmp = lame;
-  while (tmp != NULL)
-    {
-      MetaWindow *w = tmp->data;
-
-      lame_details = g_slist_prepend (lame_details,
-                                      w->res_class ? w->res_class : "");
-      lame_details = g_slist_prepend (lame_details,
-                                      w->title);
-
-      tmp = tmp->next;
-    }
-  g_slist_free (lame);
-
-  meta_show_dialog("--list",
-                   _("These windows do not support "save current setup" "
-                     "and will have to be restarted manually next time "
-                     "you log in."),
-                   "240",
-                   meta_screen_get_screen_number (meta_get_display()->active_screen),
-                   NULL, NULL,
-                   None,
-                   columns,
-                   lame_details);
-
-  g_slist_free (lame_details);
-
-  g_signal_connect (sigchld_nexus, "sigchld",
-                    G_CALLBACK (sigchld_handler),
-                    GINT_TO_POINTER (shutdown));
-
-}
-
 #endif /* HAVE_SM */