forked from AuroraMiddleware/gtk
macos: add GDK_NOTE for surface sizing and placement
This can be useful to debug sizing issues with the surface as well as the "window manager" placement code.
This commit is contained in:
parent
f2ac5576c2
commit
27e9b87fbd
@ -174,6 +174,14 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
|
|||||||
|
|
||||||
_gdk_macos_surface_set_geometry_hints (GDK_MACOS_SURFACE (self), &geometry, mask);
|
_gdk_macos_surface_set_geometry_hints (GDK_MACOS_SURFACE (self), &geometry, mask);
|
||||||
gdk_surface_constrain_size (&geometry, mask, width, height, &width, &height);
|
gdk_surface_constrain_size (&geometry, mask, width, height, &width, &height);
|
||||||
|
|
||||||
|
GDK_NOTE (MISC,
|
||||||
|
g_message ("Resizing \"%s\" to %dx%d",
|
||||||
|
GDK_MACOS_SURFACE (self)->title ?
|
||||||
|
GDK_MACOS_SURFACE (self)->title :
|
||||||
|
"untitled",
|
||||||
|
width, height));
|
||||||
|
|
||||||
_gdk_macos_surface_resize (GDK_MACOS_SURFACE (self), width, height);
|
_gdk_macos_surface_resize (GDK_MACOS_SURFACE (self), width, height);
|
||||||
|
|
||||||
/* Maximized state */
|
/* Maximized state */
|
||||||
@ -202,6 +210,13 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
|
|||||||
GDK_MACOS_SURFACE (self),
|
GDK_MACOS_SURFACE (self),
|
||||||
&x, &y);
|
&x, &y);
|
||||||
|
|
||||||
|
GDK_NOTE (MISC,
|
||||||
|
g_message ("Placing new toplevel \"%s\" at %d,%d",
|
||||||
|
GDK_MACOS_SURFACE (self)->title ?
|
||||||
|
GDK_MACOS_SURFACE (self)->title :
|
||||||
|
"untitled",
|
||||||
|
x, y));
|
||||||
|
|
||||||
_gdk_macos_surface_move (GDK_MACOS_SURFACE (self), x, y);
|
_gdk_macos_surface_move (GDK_MACOS_SURFACE (self), x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user