Allow negative margin values

This commit is contained in:
Kovid Goyal 2025-04-23 12:05:28 +05:30
parent 9d9ed5e777
commit 88735743cf
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 10 additions and 16 deletions

5
glfw/glfw3.h vendored
View file

@ -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);

5
kitty/glfw-wrapper.h generated
View file

@ -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);

View file

@ -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);