From 617b375b79b54602f0848ceff6a654dc7c5b0204 Mon Sep 17 00:00:00 2001 From: Bert Gijsbers Date: Sat, 3 Feb 2024 00:31:24 +0100 Subject: [PATCH] Force the taskbar on the XineramaPrimaryScreen for issue ice-wm/icewm#157. --- src/wmtaskbar.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wmtaskbar.cc b/src/wmtaskbar.cc index 5d9f004ef..9199d418f 100644 --- a/src/wmtaskbar.cc +++ b/src/wmtaskbar.cc @@ -692,7 +692,10 @@ void TaskBar::updateLocation() { int dx, dy; unsigned dw, dh; - desktop->getScreenGeometry(&dx, &dy, &dw, &dh, -1); + int screen = + inrange(xineramaPrimaryScreen, 0, desktop->getScreenCount() - 1) + ? xineramaPrimaryScreen : -1; + desktop->getScreenGeometry(&dx, &dy, &dw, &dh, screen); int x = dx; unsigned int w = 0;