Skip to content

Commit

Permalink
Revert "gtk: equalize on double clicking the split handle (#3557)"
Browse files Browse the repository at this point in the history
This reverts commit 09470ed, reversing
changes made to 6139cb0.
  • Loading branch information
mitchellh committed Jan 3, 2025
1 parent bc5cbf3 commit bec46fc
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/apprt/gtk/Split.zig
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@ pub fn init(
// Keep a long-lived reference, which we unref in destroy.
_ = c.g_object_ref(paned);

// Clicks
const gesture_click = c.gtk_gesture_click_new();
errdefer c.g_object_unref(gesture_click);
c.gtk_event_controller_set_propagation_phase(@ptrCast(gesture_click), c.GTK_PHASE_CAPTURE);
c.gtk_gesture_single_set_button(@ptrCast(gesture_click), 1);
c.gtk_widget_add_controller(paned, @ptrCast(gesture_click));

// Signals
_ = c.g_signal_connect_data(gesture_click, "pressed", c.G_CALLBACK(&gtkMouseDown), self, null, c.G_CONNECT_DEFAULT);

// 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
Expand Down Expand Up @@ -246,19 +236,6 @@ pub fn equalize(self: *Split) f64 {
return weight;
}

fn gtkMouseDown(
_: *c.GtkGestureClick,
n_press: c.gint,
_: c.gdouble,
_: c.gdouble,
ud: ?*anyopaque,
) callconv(.C) void {
if (n_press == 2) {
const self: *Split = @ptrCast(@alignCast(ud));
_ = equalize(self);
}
}

// maxPosition returns the maximum position of the GtkPaned, which is the
// "max-position" attribute.
fn maxPosition(self: *Split) f64 {
Expand Down

1 comment on commit bec46fc

@mitchellh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was catching double-click anywhere on the surface.

Please sign in to comment.