diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-04 01:01:50 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-04 01:01:50 +0100 |
commit | 407c87d4fe49876ebdc827682aec0928400409df (patch) | |
tree | dbb36f46f4c6975b676006feabc22a60b571cf7d /src/window/window.c | |
parent | 5c562ff95b92a9458605e69fe3a4506abbd501b7 (diff) |
Diffstat (limited to 'src/window/window.c')
-rw-r--r-- | src/window/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/window/window.c b/src/window/window.c index 097ad76..dd91110 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -1815,6 +1815,10 @@ void mgl_window_set_position(mgl_window *self, mgl_vec2i position) { } void mgl_window_set_size(mgl_window *self, mgl_vec2i size) { + if(size.x < 0) + size.x = 0; + if(size.y < 0) + size.y = 0; XResizeWindow(mgl_get_context()->connection, self->window, size.x, size.y); XFlush(mgl_get_context()->connection); } |