From b2f431a95a204c2ea5d50e9ab5c2a19677d380ab Mon Sep 17 00:00:00 2001 From: David Wales Date: Wed, 26 Feb 2025 22:47:57 +1100 Subject: [PATCH] gtk: use wide handle for GtkPaned Improves #3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 --- src/apprt/gtk/Split.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/apprt/gtk/Split.zig b/src/apprt/gtk/Split.zig index 8ddadfd13..f3a917192 100644 --- a/src/apprt/gtk/Split.zig +++ b/src/apprt/gtk/Split.zig @@ -111,6 +111,12 @@ pub fn init( // Keep a long-lived reference, which we unref in destroy. _ = c.g_object_ref(paned); + // Ensure that the drag handle for split panes never overlaps + // pane content. (#3020) + // See recommendation in upstream Gtk issue: + // https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 + c.gtk_paned_set_wide_handle(@ptrCast(paned), @intFromBool(true)); + // Update all of our containers to point to the right place. // The split has to point to where the sibling pointed to because // we're inheriting its parent. The sibling points to its location @@ -371,7 +377,6 @@ fn directionRight(self: *const Split, from: Side) ?*Surface { } } - fn directionPrevious(self: *const Split, from: Side) ?struct { surface: *Surface, wrapped: bool,