[mutter/wip/carlosg/startup-sequences: 153/159] core: Shuffle startup notification object creation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/startup-sequences: 153/159] core: Shuffle startup notification object creation
- Date: Mon, 12 Nov 2018 15:57:01 +0000 (UTC)
commit 00041014370eeb11c08af185c43e561c5fbc2917
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 22 22:51:26 2018 +0200
core: Shuffle startup notification object creation
Hook properly to MetaDisplay, instead of having it be a singleton.
src/core/display.c | 2 +-
src/core/startup-notification-private.h | 2 +-
src/core/startup-notification.c | 13 ++++---------
3 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index d8115fc3c..ddc4677bc 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -759,7 +759,7 @@ meta_display_open (void)
display->workspace_manager = meta_workspace_manager_new (display);
- display->startup_notification = meta_startup_notification_get (display);
+ display->startup_notification = meta_startup_notification_new (display);
g_signal_connect (display->startup_notification, "changed",
G_CALLBACK (on_startup_notification_changed), display);
diff --git a/src/core/startup-notification-private.h b/src/core/startup-notification-private.h
index d606aa028..334a55608 100644
--- a/src/core/startup-notification-private.h
+++ b/src/core/startup-notification-private.h
@@ -50,7 +50,7 @@ G_DECLARE_DERIVABLE_TYPE (MetaStartupSequence,
GObject)
MetaStartupNotification *
- meta_startup_notification_get (MetaDisplay *display);
+ meta_startup_notification_new (MetaDisplay *display);
gboolean meta_startup_notification_handle_xevent (MetaStartupNotification *sn,
XEvent *xevent);
diff --git a/src/core/startup-notification.c b/src/core/startup-notification.c
index b4d2cd881..161c8c7b9 100644
--- a/src/core/startup-notification.c
+++ b/src/core/startup-notification.c
@@ -540,16 +540,11 @@ meta_startup_notification_class_init (MetaStartupNotificationClass *klass)
}
MetaStartupNotification *
-meta_startup_notification_get (MetaDisplay *display)
+meta_startup_notification_new (MetaDisplay *display)
{
- static MetaStartupNotification *notification = NULL;
-
- if (!notification)
- notification = g_object_new (META_TYPE_STARTUP_NOTIFICATION,
- "display", display,
- NULL);
-
- return notification;
+ return g_object_new (META_TYPE_STARTUP_NOTIFICATION,
+ "display", display,
+ NULL);
}
GSList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]