From d2a5ac68cc98599cee9b358628f603723fd0e041 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 16 May 2025 09:21:23 +0200 Subject: Add parameters width and height to ui_create_window --- src/main/ui/x11/ui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/ui/x11/ui.c b/src/main/ui/x11/ui.c index 89aebe8..591c90e 100644 --- a/src/main/ui/x11/ui.c +++ b/src/main/ui/x11/ui.c @@ -67,10 +67,10 @@ ui_get_attributes(Window root, XVisualInfo *vi) } static Window -ui_create_window(Window root, XVisualInfo *vi) +ui_create_window(Window root, XVisualInfo *vi, int width, int height) { XSetWindowAttributes swa = ui_get_attributes(root, vi); - Window window = XCreateWindow(display, root, 0, 0, 640, 480, 0, vi->depth, InputOutput, vi->visual, + Window window = XCreateWindow(display, root, 0, 0, width, width, 0, vi->depth, InputOutput, vi->visual, CWColormap | CWEventMask, &swa); XMapWindow(display, window); @@ -92,7 +92,7 @@ ui_init() Window root = RootWindow(display, screen); XVisualInfo *vi = gl_choose_visual(screen); - window = ui_create_window(root, vi); + window = ui_create_window(root, vi, 640, 480); ui_set_title(display, window, "Tris game"); gl_context = glXCreateContext(display, vi, NULL, GL_TRUE); -- cgit v1.2.3