Format weekday and month names with strftime() and convert the locale-encoded results to UTF-8 instead of creating temporary GDateTime objects during calendar initialization.
Keep the corrected Sunday-to-Saturday weekday ordering. If %OB is unsupported, immediately reformat January with %B so the fallback also preserves the first month.
Duplicate Pango string attribute values directly instead of routing an unchanged string through g_strdup_printf.
This preserves the allocated result while avoiding unnecessary format parsing and varargs handling.
Remember the number of model nodes before updating asynchronously queried file information.
If update_file added a previously unknown file, add_file already sorted the model, so skip the redundant second full sort. Existing files still trigger the required resort after their metadata changes.
Using the node count also avoids the additional node lookup required by the original warning-cleanups implementation.
Precompute locale collation keys for font families instead of repeatedly collating names from the qsort comparator.
Describe each font face once before sorting rather than allocating and freeing descriptions for every comparison, and populate the list stores with insert_with_values.
Keep selection callbacks immediate and preserve GTK2-NG's restricted translation of standard font style names.
This reduces FontSelection creation work substantially while keeping the resulting family, face and size models unchanged.
Sort directory entries before scanning so cache layout does not depend on filesystem enumeration order.
Classify entries with one stat operation, reuse the sorted name buffers for suffix and basename handling, and release transient scan and cache-building resources once writing is complete. This preserves the sorted cache output while reducing filesystem metadata calls and eliminating observed leaks.
Provide compile-time S_ISDIR and S_ISREG fallbacks for MSVC.
Based on the openSUSE gtk2-updateiconcache_sort.patch.
Visual initialization considers eight possible depths, but GdkScreenX11 only reserved space for seven. Reserve all eight entries so a server exposing every considered depth cannot write past the array.
Look up and store CUPS authentication information through the Secret Service D-Bus API.
Enable the feature by default when CUPS support is built, requiring the libsecret development files unless explicitly disabled. Keep the print backend free of a runtime libsecret dependency so authentication continues to work when Secret Service is unavailable.
Avoid unnecessary copies and heap allocations in the CUPS authentication paths.
Use borrowed strings where their lifetime is sufficient, use stack storage for the fixed password prompt fields, replace manual auth-info copying with g_strdupv(), and remove unused per-request hostname processing.
Also free auth_info_visible in request_auth_info().
Replace the two-item GtkComboBoxText with a lightweight toggle and create icon-view zoom controls only when icon view is first used.
Keep the existing icon-view zoom, cache invalidation and settings behavior while avoiding their startup cost for the default list view. Keep the zoom event boxes local instead of storing unused widget pointers.
Use a shared private compatibility helper in the GAIL test modules.
Exercise the modern AtkValue API when ATK 2.12 or newer is available while retaining the legacy test path for older ATK versions.
Initialize temporary GValues explicitly and keep the helper symbols private to the test modules.
Add compile-time support for the modern AtkValue API available since ATK 2.12 while retaining compatibility with older ATK versions.
Implement direct modern value, range, increment and setter methods for adjustments, paned widgets, progress bars, ranges, scale buttons and spin buttons.
Keep the implementation private, avoid per-instance memory overhead and preserve the existing exported ABI.
Detect httpConnect2 and httpReconnect2 at configure time.
Preserve blocking, encryption, timeout and reconnect semantics while retaining the legacy CUPS APIs as compile-time fallbacks.
Use local compile-time selected parser helpers with a legacy Pango fallback.
Avoid temporary string decompression allocations and use unlocked stdio where available.
Add RGB48 and RGBX64 drawing APIs with direct conversion for common 15-, 16-, 24-, 30- and 32-bit TrueColor visuals. Preserve the existing GdkRGB path as a fallback for unsupported visuals and maximum dithering.
Add native big-endian four-pixel converters for RGB565, grayscale RGB565, and dithered RGB565.
Select the block converters only where cross-target code generation is favorable: RGB on PowerPC, s390x, ARMv5+, and AArch64; grayscale on PowerPC, ARMv5+, AArch64, and m68k; and dither on PowerPC. Retain the scalar fallbacks everywhere else.
The little-endian machine code remains byte-for-byte unchanged. No runtime endian checks, allocations, or additional image buffers are introduced.
Validated with a complete build and test suite, deterministic and randomized big-endian formula tests, exact little-endian .text comparison, and cross-target code-generation checks.
Add specialized converters for both 10:10:10 channel layouts and both X image byte orders.
Preserve depth-30 padding bits, avoid invalid negative shifts in the generic converter and select endian conversion at compile time.
Validated with a real Xvfb 30-bit A/B pixel test and cross-target endian store checks.
Derived from downstream commit 02a2c61f2d.
Co-authored-by: Daemonratte <daemonratte@daemonratte.net>
Based on the MSYS2 0005-Fix-header-ref.all.patch.
Use an explicit top_srcdir-relative path for gdkx.h in the GDK reference documentation instead of a fragile relative path.
Based on the openSUSE gtk2-default-printer.patch.
Avoid treating printer status updates as user-driven printer selection changes, so the print dialog can continue waiting for a default printer that may appear later.
Based on the MSYS2 0024-gtk-update-icon-cache-rc-quote.patch.
Quote the manifest path when generating the gtk-update-icon-cache resource file so windres parses it correctly.
Based on the MSYS2 0023-gdkkeys-win32.c-fix-initialisation-of-key_state-in-u.patch.
Clear the key_state array before using it during keymap updates so stale state cannot affect layout handling, including Japanese IME input.
Based on the MSYS2 0022-icontheme-win32-detect-SVG-files-by-extension.patch.
Some Windows systems report .svg files with a generic or incorrect content type. On Win32, fall back to the .svg extension so SVG icons can still be detected.
Based on the MSYS2 0013_fix_mouse_events.patch.
Use CWP_SKIPTRANSPARENT while walking from the desktop window, but stop skipping transparent windows after the first level so transparent child windows are still considered correctly.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Keep the existing gdk_window_process_all_updates() call for non-Quartz targets and for older macOS releases, but avoid this extra resize-idle update path on Big Sur and newer where it can contribute to expensive full-window redraw behaviour.
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.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Use a dynamic Objective-C call to request 8-bit layer contents on macOS 11 and newer, avoiding a hard QuartzCore/CALayer compile-time dependency and preserving old behaviour on older macOS releases.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
NSDisableScreenUpdates and NSEnableScreenUpdates are deprecated on newer macOS releases. Keep using them for older macOS versions, but avoid them on Mojave and newer.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Use the modern NSGraphicsContext CGContext accessor on Yosemite and newer, matching the existing Quartz window code, while preserving graphicsPort for older macOS versions.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
GTK2 represents macOS 10.x releases by their minor version. Read the major version as well and map macOS 11 and newer into the same sequence so Big Sur and later releases can be detected correctly.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
The NSView focus-locking API is deprecated on newer macOS releases and can cause expensive redraw behaviour. Keep the old path for older macOS versions, but avoid lockFocusIfCanDraw/unlockFocus on Mojave and newer.
Based on the MacPorts patch-gdkquartz-osx-versions.diff.
Extend the Quartz OS version enum so later macOS-specific code can
distinguish Catalina, Big Sur, Monterey, Ventura, Sonoma, and Sequoia
while preserving the existing older constants.
Based on the MacPorts patch-aliases.diff.
Keep the existing GNU visibility alias generation on other platforms, but avoid it on Apple targets where this alias mechanism is not suitable.
Based on the Mageia gtk+-2.24.32-warnings.patch.
Declare the reserved GtkTrayIconClass function pointers with explicit void parameter lists to avoid strict-prototype warnings without changing the class layout.
Based on the Guix gtk2-theme-paths.patch by Jookia.
Keep the existing ~/.themes and gtk_rc_get_theme_dir() lookup paths, but check g_get_system_data_dirs() in between so profile- and prefix-based theme installations can be found.
Based on the Guix gtk2-fix-builder-test.patch.
The callbacks are connected to notify-style signals and must take a
GParamSpec pointer, not a GParamSpec by value. This avoids stack/register
ABI problems on platforms such as ppc64el.