quartz: avoid extra content invalidation on Big Sur and newer

Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.

Keep the existing Mojave-era setNeedsDisplay workaround for macOS 10.14 and 10.15, but avoid the extra full-window invalidation on Big Sur and newer where it can cause expensive redraw behaviour.
This commit is contained in:
Daemonratte 2026-05-13 09:54:51 +02:00
commit c1fc6ed642

View file

@ -491,8 +491,9 @@ _gdk_windowing_after_process_all_updates (void)
/* 10.14 needs to be told that the view needs to be redrawn, see
* https://gitlab.gnome.org/GNOME/gtk/issues/1479 */
if (gdk_quartz_osx_version() >= GDK_OSX_MOJAVE)
[[nswindow contentView] setNeedsDisplay:YES];
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE &&
gdk_quartz_osx_version () < GDK_OSX_BIG_SUR)
[[nswindow contentView] setNeedsDisplay:YES];
[nswindow enableFlushWindow];
[nswindow flushWindow];
[nswindow release];