mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-22 13:37:37 +00:00
gtk: implement drag-to-move for splits
One major todo is moving splits across different split trees (i.e. moving across tabs and windows), but that would involve a lot more logic. This MVP version works for now. GTK version of #10090 Closes #10224
This commit is contained in:
@@ -183,6 +183,18 @@ pub fn SplitTree(comptime V: type) type {
|
||||
};
|
||||
}
|
||||
|
||||
/// Find the handle within this tree that corresponds
|
||||
/// to the given view. Uses pointer equality.
|
||||
pub fn locate(self: *const Self, view: *const View) ?Node.Handle {
|
||||
var it = self.iterator();
|
||||
while (it.next()) |entry| {
|
||||
if (entry.view == view) {
|
||||
return entry.handle;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// An iterator over all the views in the tree.
|
||||
pub fn iterator(
|
||||
self: *const Self,
|
||||
|
||||
Reference in New Issue
Block a user