mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 11:35:48 +00:00
# Add GSettings Support for Primary Paste Implements support for `org.gnome.desktop.interface gtk-enable-primary-paste` to allow users to disable middle-click paste. Also refactors GTK Settings access into a reusable generic module. ## Changes - **NEW**: `src/apprt/gtk/gsettings.zig` - Generic GTK Settings reader supporting `bool` and `c_int` types, portal-aware for Flatpak/Snap - **MODIFIED**: `src/apprt/gtk/class/surface.zig` - Reads primary paste setting and refactors gtk-xft-dpi to use new module ## Behavior - Setting `false` → Middle-click paste blocked - Setting `true` or unavailable → Middle-click paste works (default) - Uses GTK Settings API which automatically uses XDG Desktop Portal in sandboxed environments Note: No unit tests added as this is a thin wrapper around GTK Settings API that's already tested indirectly through surface.zig. Happy to add tests if desired, though they would require an active display environment and skip on most CI systems.