From 7c91f307b836b7508ad05b0f0c6713ae956c95a7 Mon Sep 17 00:00:00 2001 From: warfl0p Date: Fri, 20 Nov 2026 09:35:14 +0100 Subject: [PATCH] Remap the launcher surface after a monitor change The launcher keeps its surface mapped while hidden. A monitor hotplug or layout change can destroy the output under that surface while `mapped` stays true, so the next show never maps a new surface and the launcher stays invisible until the shell restarts. Reset `mapped` and `pinnedScreen` when the screen list changes while hidden. Fixes #112 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018pJceKmUe69o5QwAgTaNse --- ui/LauncherWindow.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui/LauncherWindow.qml b/ui/LauncherWindow.qml index f88b8f6..71e9f80 100644 --- a/ui/LauncherWindow.qml +++ b/ui/LauncherWindow.qml @@ -54,6 +54,18 @@ PanelWindow { } return window.pinnedScreen || (screens.length ? screens[0] : null) } + // A monitor hotplug or layout change can destroy the output the kept-mapped + // surface lives on, while `mapped` stays true: the next show then never + // remaps and the launcher stays invisible. Drop the surface so the next + // show maps a fresh one on the focused screen. + Connections { + target: Quickshell + function onScreensChanged() { + if (window.shown) return + window.mapped = false + window.pinnedScreen = null + } + } mask: window.shown ? null : noInput Region { id: noInput } anchors { top: true; bottom: true; left: true; right: true }