aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-09 17:22:51 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-09 17:23:45 +0100
commit6be9dee8685e9f79aa0b182e8acb690ea9ac16ef (patch)
tree98dc72d7c2496283549ff7340b8739cd7cb8e8e7
parentf38661593795e51e45e2dc2ead8a7bf897d226f6 (diff)
Fix freeze on startup on hyprland because of hack workaround, requires window to be visible. Remove titlebar on hyprland
-rw-r--r--README.md1
-rw-r--r--src/Overlay.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 6c5ff1c..7ed2152 100644
--- a/README.md
+++ b/README.md
@@ -50,3 +50,4 @@ If you want to donate you can donate via bitcoin or monero.
# Known issues
* Some games receive mouse input while the UI is open
* Global hotkeys on Wayland can clash with keys used by other applications. This is primarly because Wayland compositors are missing support for global hotkey so this software uses a global hotkey system that works on all Wayland compositors.
+* When the UI is open the wallpaper is shown instead of the game on Hyprland and Sway. This is an issue with Hyprland and Sway. It cant be fixed until the UI is redesigned to not be a fullscreen overlay.
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index e10b1e4..d306910 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -301,7 +301,8 @@ namespace gsr {
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};
@@ -1002,8 +1003,7 @@ namespace gsr {
// XFlush(display);
// }
- if(!prevent_game_minimizing)
- window->set_fullscreen(true);
+ window->set_fullscreen(true);
visible = true;