mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
macos: Add surface from ::constructed()
This commit is contained in:
parent
cb642bec25
commit
f2083d36a1
@ -121,6 +121,8 @@ GdkMonitor *_gdk_macos_display_get_monitor_at_coords (GdkMacosDisp
|
||||
GdkMonitor *_gdk_macos_display_get_monitor_at_display_coords (GdkMacosDisplay *self,
|
||||
int x,
|
||||
int y);
|
||||
void _gdk_macos_display_surface_added (GdkMacosDisplay *self,
|
||||
GdkMacosSurface *surface);
|
||||
GdkEvent *_gdk_macos_display_translate (GdkMacosDisplay *self,
|
||||
NSEvent *event);
|
||||
void _gdk_macos_display_feedback_init (GdkMacosDisplay *self);
|
||||
|
@ -333,7 +333,7 @@ gdk_macos_display_queue_events (GdkDisplay *display)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
_gdk_macos_display_surface_added (GdkMacosDisplay *self,
|
||||
GdkMacosSurface *surface)
|
||||
{
|
||||
@ -552,9 +552,6 @@ gdk_macos_display_create_surface (GdkDisplay *display,
|
||||
|
||||
surface = _gdk_macos_surface_new (self, surface_type, parent);
|
||||
|
||||
if (surface != NULL)
|
||||
_gdk_macos_display_surface_added (self, surface);
|
||||
|
||||
return GDK_SURFACE (surface);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ _gdk_macos_drag_surface_constructed (GObject *object)
|
||||
GdkMacosWindow *window;
|
||||
GdkMacosSurface *self = GDK_MACOS_SURFACE (object);
|
||||
GdkSurface *surface = GDK_SURFACE (self);
|
||||
GdkDisplay *display = gdk_surface_get_display (GDK_SURFACE (self));
|
||||
GdkMacosDisplay *display = GDK_MACOS_DISPLAY (gdk_surface_get_display (GDK_SURFACE (self)));
|
||||
GdkFrameClock *frame_clock;
|
||||
NSScreen *screen;
|
||||
NSUInteger style_mask;
|
||||
@ -129,9 +129,7 @@ _gdk_macos_drag_surface_new (GdkMacosDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_MACOS_DISPLAY (display), NULL);
|
||||
|
||||
self = g_object_new (GDK_TYPE_MACOS_DRAG_SURFACE,
|
||||
return g_object_new (GDK_TYPE_MACOS_DRAG_SURFACE,
|
||||
"display", display,
|
||||
NULL);
|
||||
|
||||
return g_steal_pointer (&self);
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ _gdk_macos_popup_surface_constructed (GObject *object)
|
||||
GdkMacosWindow *window;
|
||||
GdkMacosPopupSurface *self = GDK_MACOS_POPUP_SURFACE (object);
|
||||
GdkSurface *surface = GDK_SURFACE (self);
|
||||
GdkDisplay *display = gdk_surface_get_display (GDK_SURFACE (self));
|
||||
GdkMacosDisplay *display = GDK_MACOS_DISPLAY (gdk_surface_get_display (GDK_SURFACE (self)));
|
||||
NSScreen *screen;
|
||||
NSUInteger style_mask;
|
||||
NSRect content_rect;
|
||||
|
@ -522,6 +522,9 @@ gdk_macos_surface_constructed (GObject *object)
|
||||
|
||||
if (self->window != NULL)
|
||||
_gdk_macos_surface_configure (self);
|
||||
|
||||
_gdk_macos_display_surface_added (GDK_MACOS_DISPLAY (gdk_surface_get_display (GDK_SURFACE (self))),
|
||||
self);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user