mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
core: Shuffle startup notification object creation
Hook properly to MetaDisplay, instead of having it be a singleton.
This commit is contained in:
parent
8a10196382
commit
4a69a0d7f7
@ -761,7 +761,7 @@ meta_display_open (void)
|
|||||||
|
|
||||||
display->workspace_manager = meta_workspace_manager_new (display);
|
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_signal_connect (display->startup_notification, "changed",
|
||||||
G_CALLBACK (on_startup_notification_changed), display);
|
G_CALLBACK (on_startup_notification_changed), display);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ G_DECLARE_DERIVABLE_TYPE (MetaStartupSequence,
|
|||||||
GObject)
|
GObject)
|
||||||
|
|
||||||
MetaStartupNotification *
|
MetaStartupNotification *
|
||||||
meta_startup_notification_get (MetaDisplay *display);
|
meta_startup_notification_new (MetaDisplay *display);
|
||||||
|
|
||||||
gboolean meta_startup_notification_handle_xevent (MetaStartupNotification *sn,
|
gboolean meta_startup_notification_handle_xevent (MetaStartupNotification *sn,
|
||||||
XEvent *xevent);
|
XEvent *xevent);
|
||||||
|
@ -540,16 +540,11 @@ meta_startup_notification_class_init (MetaStartupNotificationClass *klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MetaStartupNotification *
|
MetaStartupNotification *
|
||||||
meta_startup_notification_get (MetaDisplay *display)
|
meta_startup_notification_new (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
static MetaStartupNotification *notification = NULL;
|
return g_object_new (META_TYPE_STARTUP_NOTIFICATION,
|
||||||
|
"display", display,
|
||||||
if (!notification)
|
NULL);
|
||||||
notification = g_object_new (META_TYPE_STARTUP_NOTIFICATION,
|
|
||||||
"display", display,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
return notification;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList *
|
GSList *
|
||||||
|
Loading…
Reference in New Issue
Block a user