mirror of
https://github.com/brl/mutter.git
synced 2025-07-29 04:58:03 +00:00
Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow
For some consumers it's significantly more convenient to be able to directly connect to a signal on the Window to know when Mutter is done with it, rather than having to connect to each Workspace object (and handle workspace additions, etc.). Similarly, add window-created which acts globally. https://bugzilla.gnome.org/show_bug.cgi?id=598289
This commit is contained in:
@@ -146,6 +146,7 @@ enum
|
||||
WORKSPACE_CHANGED,
|
||||
FOCUS,
|
||||
RAISED,
|
||||
UNMANAGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@@ -322,6 +323,15 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[UNMANAGED] =
|
||||
g_signal_new ("unmanaged",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1081,6 +1091,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
|
||||
window->constructing = FALSE;
|
||||
|
||||
meta_display_notify_window_created (display, window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -1453,6 +1465,8 @@ meta_window_unmanage (MetaWindow *window,
|
||||
|
||||
meta_error_trap_pop (window->display, FALSE);
|
||||
|
||||
g_signal_emit (window, window_signals[UNMANAGED], 0);
|
||||
|
||||
g_object_unref (window);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user