[mutter/wip/carlosg/startup-sequences: 155/159] core: Use MetaStartupSequence internally
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/startup-sequences: 155/159] core: Use MetaStartupSequence internally
- Date: Mon, 12 Nov 2018 15:57:11 +0000 (UTC)
commit 92ede7643dd99c181d4623537458c567e57c2945
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 22 23:33:03 2018 +0200
core: Use MetaStartupSequence internally
Replace code in MetaDisplay so it uses MetaStartupSequence
src/core/display.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 88dad813b..9e59ea580 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -3149,10 +3149,9 @@ gboolean
meta_display_apply_startup_properties (MetaDisplay *display,
MetaWindow *window)
{
-#ifdef HAVE_STARTUP_NOTIFICATION
const char *startup_id;
- GSList *l;
- SnStartupSequence *sequence;
+ GSList *startup_sequences, *l;
+ MetaStartupSequence *sequence;
/* Does the window have a startup ID stored? */
startup_id = meta_window_get_startup_id (window);
@@ -3162,6 +3161,8 @@ meta_display_apply_startup_properties (MetaDisplay *display,
window->desc,
startup_id ? startup_id : "(none)");
+ startup_sequences =
+ meta_startup_notification_get_sequences (display->startup_notification);
sequence = NULL;
if (!startup_id)
{
@@ -3169,12 +3170,12 @@ meta_display_apply_startup_properties (MetaDisplay *display,
* startup-notification library whether there's anything
* stored for the resource name or resource class hints.
*/
- for (l = display->startup_sequences; l; l = l->next)
+ for (l = startup_sequences; l; l = l->next)
{
const char *wmclass;
- SnStartupSequence *seq = l->data;
+ MetaStartupSequence *seq = l->data;
- wmclass = sn_startup_sequence_get_wmclass (seq);
+ wmclass = meta_startup_sequence_get_wmclass (seq);
if (wmclass != NULL &&
((window->res_class &&
@@ -3185,15 +3186,15 @@ meta_display_apply_startup_properties (MetaDisplay *display,
sequence = seq;
g_assert (window->startup_id == NULL);
- window->startup_id = g_strdup (sn_startup_sequence_get_id (sequence));
+ window->startup_id = g_strdup (meta_startup_sequence_get_id (sequence));
startup_id = window->startup_id;
meta_topic (META_DEBUG_STARTUP,
"Ending legacy sequence %s due to window %s\n",
- sn_startup_sequence_get_id (sequence),
+ meta_startup_sequence_get_id (sequence),
window->desc);
- sn_startup_sequence_complete (sequence);
+ meta_startup_sequence_complete (sequence);
break;
}
}
@@ -3209,12 +3210,12 @@ meta_display_apply_startup_properties (MetaDisplay *display,
*/
if (sequence == NULL)
{
- for (l = display->startup_sequences; l != NULL; l = l->next)
+ for (l = startup_sequences; l != NULL; l = l->next)
{
- SnStartupSequence *seq = l->data;
+ MetaStartupSequence *seq = l->data;
const char *id;
- id = sn_startup_sequence_get_id (seq);
+ id = meta_startup_sequence_get_id (seq);
if (strcmp (id, startup_id) == 0)
{
@@ -3234,7 +3235,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
if (!window->initial_workspace_set)
{
- int space = sn_startup_sequence_get_workspace (sequence);
+ int space = meta_startup_sequence_get_workspace (sequence);
if (space >= 0)
{
meta_topic (META_DEBUG_STARTUP,
@@ -3249,7 +3250,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
if (!window->initial_timestamp_set)
{
- guint32 timestamp = sn_startup_sequence_get_timestamp (sequence);
+ guint32 timestamp = meta_startup_sequence_get_timestamp (sequence);
meta_topic (META_DEBUG_STARTUP,
"Setting initial window timestamp to %u based on startup info\n",
timestamp);
@@ -3268,8 +3269,6 @@ meta_display_apply_startup_properties (MetaDisplay *display,
window->desc, startup_id);
}
-#endif /* HAVE_STARTUP_NOTIFICATION */
-
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]