Commit graph

22,258 commits

Author SHA1 Message Date
d68da92e04 build: fix cross-build host tool detection 2026-08-18 20:12:49 +02:00
fc608281a2 build: support glibtoolize on Darwin 2026-08-18 19:49:23 +02:00
6d7bb4c86a gtkcalendar: preserve strftime calendar names
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.
2026-08-13 00:55:35 +02:00
240b7d0a71 gail: avoid formatting string attribute values
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.
2026-08-13 00:11:57 +02:00
6ad2ee66d9 gtkfilesystemmodel: avoid sorting newly queried files twice
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.
2026-08-13 00:06:32 +02:00
09131ada3a fontsel: reduce font list sorting overhead
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.
2026-08-12 23:17:34 +02:00
be71ea43fc updateiconcache: make directory scans deterministic and leaner
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.
2026-08-12 21:54:38 +02:00
f8ff879dd2 x11: size available depth array correctly
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.
2026-08-12 20:59:11 +02:00
fa2e5d3293 cups: remember authentication with Secret Service
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.
2026-08-12 19:38:55 +02:00
399e6ee64e cups: reduce authentication allocation overhead
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().
2026-08-11 10:48:41 +02:00
efcc412ca2 filechooser: reduce view mode startup overhead
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.
2026-08-11 09:53:27 +02:00
212df8a74e fontsel: localize common font style names 2026-08-10 14:08:34 +02:00
0f4142b31a introspection: add GdkWin32 GIR generation 2026-08-10 12:05:31 +02:00
f14303e16f introspection: pass compiler and GTK DLL path to scanner 2026-08-09 23:10:13 +02:00
ea73f6812c gtk: replace deprecated tooltip timestamp ABI field 2026-08-07 08:53:00 +02:00
782a2948b8 gail: update AtkValue test modules
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.
2026-08-07 08:53:00 +02:00
a116a5d13b gail: implement modern AtkValue interface
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.
2026-08-07 08:53:00 +02:00
d0c4346396 cups: use modern HTTP connection helpers when available
Detect httpConnect2 and httpReconnect2 at configure time.

Preserve blocking, encryption, timeout and reconnect semantics while retaining the legacy CUPS APIs as compile-time fallbacks.
2026-08-07 08:53:00 +02:00
0911aa2f2f gtk: remove unused IM module query function pointers
Keep symbol validation while avoiding unused typed variables and assignments.
2026-08-07 08:53:00 +02:00
672b195592 gtk: reuse cached module path list
Avoid computing and allocating the module path list a second time.
2026-08-07 08:53:00 +02:00
450e784037 gtk: replace deprecated IM module parser helpers
Use local compile-time selected parser helpers with a legacy Pango fallback.

Avoid temporary string decompression allocations and use unlocked stdio where available.
2026-08-07 08:53:00 +02:00
73183e1a30 gdk: add high-depth RGB image drawing
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.
2026-08-05 12:15:23 +02:00
8984300bba gdk: optimize packed StaticColor conversion 2026-08-04 21:26:05 +02:00
a923aa3120 gdk: fix packed StaticColor dithering 2026-08-04 19:41:58 +02:00
b58fc23765 gdk: support 2-bit StaticColor visuals 2026-08-04 19:08:54 +02:00
e92e770558 gdk: support 3-bit StaticColor visuals 2026-08-04 18:52:31 +02:00
be64a902a5 gdk: optimize native big-endian RGB565 paths
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.
2026-08-04 17:57:34 +02:00
71023e0333 gdk: add endian-aware 30-bit RGB converters
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>
2026-08-04 15:34:12 +02:00
00177dd11c docs: use top_srcdir for GDK X11 header reference
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.
2026-08-04 14:02:32 +02:00
b622340b5b print: preserve default-printer wait during status updates
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.
2026-08-04 12:41:19 +02:00
757774345d win32: quote icon cache manifest in resource file
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.
2026-08-04 09:00:57 +02:00
4d7fc95583 win32: initialize key state before updating keymap
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.
2026-08-04 09:00:57 +02:00
d181fe8fc3 icontheme: detect SVG icons by extension on Win32
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.
2026-08-04 09:00:57 +02:00
65f949bcde win32: improve mouse window lookup through transparent children
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.
2026-08-04 09:00:57 +02:00
8d4015ee54 quartz: avoid extra resize-idle updates on Big Sur and newer
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.
2026-08-04 08:45:38 +02:00
c1fc6ed642 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.
2026-08-04 08:45:38 +02:00
9d7c7e63d6 quartz: request 8-bit layer contents on Big Sur and newer
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.
2026-08-04 08:45:38 +02:00
fe45d0944c quartz: avoid screen update suppression on Mojave and newer
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.
2026-08-04 08:45:38 +02:00
21fdf2eeaa quartz: use CGContext accessor on Yosemite 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.
2026-08-04 08:45:38 +02:00
8b7fda063e quartz: map macOS 11 and newer to internal OS 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.
2026-08-04 08:45:38 +02:00
0bc8029032 quartz: avoid focus locking on Mojave and newer
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.
2026-08-04 08:45:38 +02:00
72dcfc7ca5 quartz: add newer macOS version constants
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.
2026-08-04 08:45:38 +02:00
292e512bc4 build: disable GNU visibility aliases on Apple platforms
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.
2026-08-04 08:45:38 +02:00
d8b26dc0b7 gtktrayicon: use explicit void prototypes for reserved slots
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.
2026-08-04 08:37:17 +02:00
790b8c2b69 gtkrc: search XDG data dirs for themes
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.
2026-08-03 16:06:17 +02:00
0e8d6a76b6 tests: fix GtkBuilder signal callback prototypes
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.
2026-08-03 15:55:03 +02:00
c0ea568364 fix alias check for out-of-tree builds 2026-08-03 15:13:45 +02:00
fc7bd3870d fix weekday name ordering 2026-08-03 12:07:46 +02:00
greenjeans
438b19a0d6 Update git.mk
Removed stale github link in comments
2026-07-05 21:04:41 +00:00
greenjeans
e363bff72c Update MAINTAINERS 2026-07-05 20:50:19 +00:00