From 9b8c6cabcd2d6a15e644f6e0a7baf649715f5f5c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 9 Dec 2024 17:05:28 +0100 Subject: Fix freeze on startup on hyprland because of hack workaround, requires window to be visible --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 8c30508..25cb72a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -171,7 +171,8 @@ static const mgl_monitor* find_monitor_at_position(mgl::Window &window, mgl::vec static mgl::vec2i create_window_get_center_position(Display *display) { XSetWindowAttributes window_attr; window_attr.event_mask = StructureNotifyMask; - const Window window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 32, 32, 0, CopyFromParent, InputOutput, CopyFromParent, CWEventMask, &window_attr); + window_attr.background_pixel = 0; + const Window window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 16, 16, 0, CopyFromParent, InputOutput, CopyFromParent, CWBackPixel | CWEventMask, &window_attr); if(!window) return {0, 0}; -- cgit v1.2.3