diff --git a/glfw/glfw3.h b/glfw/glfw3.h index 3c50fdd84..feb8774bd 100644 --- a/glfw/glfw3.h +++ b/glfw/glfw3.h @@ -1313,10 +1313,7 @@ typedef struct GLFWLayerShellConfig { GLFWFocusPolicy focus_policy; unsigned x_size_in_cells, x_size_in_pixels; unsigned y_size_in_cells, y_size_in_pixels; - unsigned requested_top_margin; - unsigned requested_left_margin; - unsigned requested_bottom_margin; - unsigned requested_right_margin; + int requested_top_margin, requested_left_margin, requested_bottom_margin, requested_right_margin; int requested_exclusive_zone; unsigned override_exclusive_zone; void (*size_callback)(GLFWwindow *window, float xscale, float yscale, unsigned *cell_width, unsigned *cell_height, double *left_edge_spacing, double *top_edge_spacing, double *right_edge_spacing, double *bottom_edge_spacing); diff --git a/kitty/glfw-wrapper.h b/kitty/glfw-wrapper.h index 49d79337c..fca9f20c0 100644 --- a/kitty/glfw-wrapper.h +++ b/kitty/glfw-wrapper.h @@ -1051,10 +1051,7 @@ typedef struct GLFWLayerShellConfig { GLFWFocusPolicy focus_policy; unsigned x_size_in_cells, x_size_in_pixels; unsigned y_size_in_cells, y_size_in_pixels; - unsigned requested_top_margin; - unsigned requested_left_margin; - unsigned requested_bottom_margin; - unsigned requested_right_margin; + int requested_top_margin, requested_left_margin, requested_bottom_margin, requested_right_margin; int requested_exclusive_zone; unsigned override_exclusive_zone; void (*size_callback)(GLFWwindow *window, float xscale, float yscale, unsigned *cell_width, unsigned *cell_height, double *left_edge_spacing, double *top_edge_spacing, double *right_edge_spacing, double *bottom_edge_spacing); diff --git a/kitty/glfw.c b/kitty/glfw.c index 3fd03b430..2805c5d67 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1166,10 +1166,10 @@ layer_shell_config_to_python(const GLFWLayerShellConfig *c) { A(y_size_in_cells, fu); A(x_size_in_pixels, fu); A(y_size_in_pixels, fu); - A(requested_top_margin, fu); - A(requested_left_margin, fu); - A(requested_bottom_margin, fu); - A(requested_right_margin, fu); + A(requested_top_margin, fl); + A(requested_left_margin, fl); + A(requested_bottom_margin, fl); + A(requested_right_margin, fl); A(requested_exclusive_zone, fl); A(override_exclusive_zone, b); #undef A @@ -1187,10 +1187,10 @@ layer_shell_config_from_python(PyObject *p, GLFWLayerShellConfig *ans) { A(type, PyLong_Check, PyLong_AsLong); A(edge, PyLong_Check, PyLong_AsLong); A(focus_policy, PyLong_Check, PyLong_AsLong); - A(x_size_in_cells, PyLong_Check, PyLong_AsLong); - A(y_size_in_cells, PyLong_Check, PyLong_AsLong); - A(x_size_in_pixels, PyLong_Check, PyLong_AsLong); - A(y_size_in_pixels, PyLong_Check, PyLong_AsLong); + A(x_size_in_cells, PyLong_Check, PyLong_AsUnsignedLong); + A(y_size_in_cells, PyLong_Check, PyLong_AsUnsignedLong); + A(x_size_in_pixels, PyLong_Check, PyLong_AsUnsignedLong); + A(y_size_in_pixels, PyLong_Check, PyLong_AsUnsignedLong); A(requested_top_margin, PyLong_Check, PyLong_AsLong); A(requested_left_margin, PyLong_Check, PyLong_AsLong); A(requested_bottom_margin, PyLong_Check, PyLong_AsLong);