core/window: Implement GInitable
Currently, we will notify the display about a new window being created during the constructed phase of the GObject. During this time, property-change notifications are frozen by GObject, so we'll emit a few ::notify signals only after the window-created signal, although the actual property change happened before that. This caused confusion in gnome-shell code where a notify::skip-taskbar = true emission was seen when the property already was true inside a window-created handler before. In order to fix that that, we notify the window creation post-construction of the GObject on GInitable.init vfunc Details https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6119#note_1598983 Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6119 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2703>
This commit is contained in:
@ -908,11 +908,12 @@ meta_window_wayland_new (MetaDisplay *display,
|
||||
MetaWindowWayland *wl_window;
|
||||
MetaWindow *window;
|
||||
|
||||
window = g_object_new (META_TYPE_WINDOW_WAYLAND,
|
||||
"display", display,
|
||||
"effect", META_COMP_EFFECT_CREATE,
|
||||
"surface", surface,
|
||||
NULL);
|
||||
window = g_initable_new (META_TYPE_WINDOW_WAYLAND,
|
||||
NULL, NULL,
|
||||
"display", display,
|
||||
"effect", META_COMP_EFFECT_CREATE,
|
||||
"surface", surface,
|
||||
NULL);
|
||||
wl_window = META_WINDOW_WAYLAND (window);
|
||||
set_geometry_scale_for_window (wl_window, wl_window->geometry_scale);
|
||||
|
||||
|
Reference in New Issue
Block a user