[quartz] GdkQuartzNSWindow: Pad only the content_rect width.

On Quartz the drawing region must be padded out to a multiple of 4 px
on regular displays and 8 px on Retina ones. Failing to do so used to
cause smearing on multi-monitor mixed-DPI systems but that seems to
have been fixed. There remains a visible flicker in animations.

Padding the GdkWindow width as well as the content frame and cairo
surface causes the frame clock to get frozen if multiple calls to
gtk_window_resize use the same size because
gdk_window_move_resize_internal sees a difference between the window
size and the requested size (the latter isn't padded out) and freezes updates. GdkQuartzNSWindow
windowDidResize is supposed to thaw them, but because the padded-out
width set for the frame doesn't change the window isn't resized and
the frame clock is never thawed.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7188
This commit is contained in:
John Ralls 2024-12-25 20:29:19 -08:00
parent c79539dc8c
commit 41bd9e4290

View File

@ -246,10 +246,7 @@ synthesize_configure_event(GdkWindow *window)
window->height = content_rect.size.height;
if(window->width % align)
{
window->width += align - window->width % align;
content_rect.size.width = window->width;
}
content_rect.size.width = window->width + align - window->width % align;
content_rect.origin.x = 0;
content_rect.origin.y = 0;