diff options
Diffstat (limited to 'src/window')
-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); } |