mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
apprt/gtk: implement default window size
This commit is contained in:
@ -325,6 +325,16 @@ pub fn getSize(self: *const Surface) !apprt.SurfaceSize {
|
|||||||
return self.size;
|
return self.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn setInitialWindowSize(self: *const Surface, width: u32, height: u32) !void {
|
||||||
|
// Note: this doesn't properly take into account the window decorations.
|
||||||
|
// I'm not currently sure how to do that.
|
||||||
|
c.gtk_window_set_default_size(
|
||||||
|
@ptrCast(self.window.window),
|
||||||
|
@intCast(width),
|
||||||
|
@intCast(height),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn setSizeLimits(self: *Surface, min: apprt.SurfaceSize, max_: ?apprt.SurfaceSize) !void {
|
pub fn setSizeLimits(self: *Surface, min: apprt.SurfaceSize, max_: ?apprt.SurfaceSize) !void {
|
||||||
_ = self;
|
_ = self;
|
||||||
_ = min;
|
_ = min;
|
||||||
|
Reference in New Issue
Block a user