From: Benjamin Otte Date: Tue, 18 Apr 2023 14:37:43 +0000 (+0200) Subject: macos: Move construction stuff into ::constructed X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~368^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=093a4e83d581b7a5547f4712f67b2e7ef82fd8ce;p=gtk4.git macos: Move construction stuff into ::constructed --- diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index dc4375730c..1c2008a521 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -527,6 +527,9 @@ gdk_macos_surface_constructed (GObject *object) G_CONNECT_SWAPPED); } + gdk_surface_freeze_updates (GDK_SURFACE (self)); + _gdk_macos_surface_monitor_changed (self); + if (self->window != NULL) _gdk_macos_surface_configure (self); } @@ -612,13 +615,9 @@ gdk_macos_surface_init (GdkMacosSurface *self) } GdkMacosSurface * -_gdk_macos_surface_new (GdkMacosDisplay *display, - GdkSurfaceType surface_type, - GdkSurface *parent, - int x, - int y, - int width, - int height) +_gdk_macos_surface_new (GdkMacosDisplay *display, + GdkSurfaceType surface_type, + GdkSurface *parent) { GdkFrameClock *frame_clock; GdkMacosSurface *ret; @@ -649,12 +648,6 @@ _gdk_macos_surface_new (GdkMacosDisplay *display, ret = NULL; } - if (ret != NULL) - { - gdk_surface_freeze_updates (GDK_SURFACE (ret)); - _gdk_macos_surface_monitor_changed (ret); - } - g_object_unref (frame_clock); return g_steal_pointer (&ret);