From f2352efd98d6c6db95b456a8899a5f4b42d9c06b Mon Sep 17 00:00:00 2001
From: Diederik ter Rahe <dterrahe@yahoo.com>
Date: Wed, 18 Dec 2024 07:47:47 -0500
Subject: [PATCH] fix bauhaus popup crash on scaled wayland displays

---
 src/bauhaus/bauhaus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bauhaus/bauhaus.c b/src/bauhaus/bauhaus.c
index 4dda345b6691..28e33b8cd485 100644
--- a/src/bauhaus/bauhaus.c
+++ b/src/bauhaus/bauhaus.c
@@ -476,8 +476,8 @@ static void _window_position(const int offset)
     gtk_widget_set_app_paintable(pop->window, TRUE);
     GdkScreen *screen = gtk_widget_get_screen(pop->window);
     GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
-    pop->offcut = -10000;
-    height = -2 * pop->offcut;
+    pop->offcut = -height;
+    height *= 2;
     gtk_widget_set_visual(pop->window, visual);
   }
 #endif