From 3f38c1534a4a41a7959420ec8f6decfb8b86df9e Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 16 May 2025 14:49:27 +0200 Subject: Add the function for UI resize event --- src/main/ui/x11/ui.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/ui/x11/ui.c') diff --git a/src/main/ui/x11/ui.c b/src/main/ui/x11/ui.c index cb4401f..8bdd93c 100644 --- a/src/main/ui/x11/ui.c +++ b/src/main/ui/x11/ui.c @@ -106,6 +106,12 @@ ui_on_expose(XEvent event, void (*draw_frame)()) glXSwapBuffers(display, window); } +static void +ui_on_resize(XEvent event) +{ + if (event.type != ConfigureNotify) return; +} + void ui_loop(void (*draw_frame)()) { @@ -113,6 +119,7 @@ ui_loop(void (*draw_frame)()) while (1) { XNextEvent(display, &event); ui_on_expose(event, draw_frame); + ui_on_resize(event); if (event.type == KeyPress) { break; } -- cgit v1.2.3