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
91f5bfd211
commit
92261b5022
@ -174,6 +174,14 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
|
||||
|
||||
_gdk_macos_surface_set_geometry_hints (GDK_MACOS_SURFACE (self), &geometry, mask);
|
||||
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);
|
||||
|
||||
/* Maximized state */
|
||||
@ -202,6 +210,13 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
|
||||
GDK_MACOS_SURFACE (self),
|
||||
&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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user