mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
Merge pull request #2405 from ghostty-org/push-pwuvkvrtvytu
gtk: only set initial window size if its the first terminal in a window
This commit is contained in:
@ -773,8 +773,13 @@ pub fn getSize(self: *const Surface) !apprt.SurfaceSize {
|
||||
}
|
||||
|
||||
pub fn setInitialWindowSize(self: *const Surface, width: u32, height: u32) !void {
|
||||
// This operation only makes sense if we're within a window view hierarchy.
|
||||
// If we are within a split, do not set the size.
|
||||
if (self.container.split() != null) return;
|
||||
|
||||
// This operation only makes sense if we're within a window view
|
||||
// hierarchy and we're the first tab in the window.
|
||||
const window = self.container.window() orelse return;
|
||||
if (window.notebook.nPages() > 1) return;
|
||||
|
||||
// Note: this doesn't properly take into account the window decorations.
|
||||
// I'm not currently sure how to do that.
|
||||
|
Reference in New Issue
Block a user