From 552d401788259f9f95e0a0b9ad115934d450e25c Mon Sep 17 00:00:00 2001 From: Lemmy Date: Sun, 8 Feb 2026 11:54:03 -0500 Subject: [PATCH] launcher: in overview mode, no need to check if that bar exists on the target screen --- Services/Control/CurrentScreenDetector.qml | 11 +++++++---- Services/Control/IPCService.qml | 12 ++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Services/Control/CurrentScreenDetector.qml b/Services/Control/CurrentScreenDetector.qml index 3d1b5c006..8ab719eec 100644 --- a/Services/Control/CurrentScreenDetector.qml +++ b/Services/Control/CurrentScreenDetector.qml @@ -24,6 +24,7 @@ Item { // Pending callback to execute once screen is detected property var pendingCallback: null + property bool pendingSkipBarCheck: false // Detected screen property var detectedScreen: null @@ -70,7 +71,7 @@ Item { * On single-monitor setups, executes immediately. * On multi-monitor setups, briefly opens an invisible window to detect the screen. */ - function withCurrentScreen(callback: var) { + function withCurrentScreen(callback: var, skipBarCheck: bool) { if (root.pendingCallback) { Logger.w("CurrentScreenDetector", "Another detection is pending, ignoring new call"); return; @@ -86,8 +87,8 @@ Item { let screen = CompositorService.getFocusedScreen(); if (screen) { - // Apply the bar check if configured - if (!Settings.data.general.allowPanelsOnScreenWithoutBar) { + // Apply the bar check if configured (skip for overlay launcher etc.) + if (!skipBarCheck && !Settings.data.general.allowPanelsOnScreenWithoutBar) { const monitors = Settings.data.bar.monitors || []; const hasBar = monitors.length === 0 || monitors.includes(screen.name); if (!hasBar) { @@ -102,6 +103,7 @@ Item { // Fallback: Multi-monitor setup needs async detection via invisible PanelWindow root.detectedScreen = null; root.pendingCallback = callback; + root.pendingSkipBarCheck = !!skipBarCheck; screenDetectorLoader.active = true; } @@ -114,7 +116,7 @@ Item { // Execute pending callback if any if (root.pendingCallback) { - if (!Settings.data.general.allowPanelsOnScreenWithoutBar) { + if (!root.pendingSkipBarCheck && !Settings.data.general.allowPanelsOnScreenWithoutBar) { // If we explicitly disabled panels on screen without bar, check if bar is configured // for this screen, and fallback to primary screen if necessary var monitors = Settings.data.bar.monitors || []; @@ -129,6 +131,7 @@ Item { // if the callback throws an error var callback = root.pendingCallback; root.pendingCallback = null; + root.pendingSkipBarCheck = false; try { callback(root.detectedScreen); } catch (e) { diff --git a/Services/Control/IPCService.qml b/Services/Control/IPCService.qml index 02c0ca25a..ef40d1221 100644 --- a/Services/Control/IPCService.qml +++ b/Services/Control/IPCService.qml @@ -132,7 +132,7 @@ Item { // In another mode -> switch to app mode PanelService.setLauncherSearchText(screen, ""); } - }); + }, Settings.data.appLauncher.overviewLayer); } function clipboard() { root.screenDetector.withCurrentScreen(screen => { @@ -148,7 +148,7 @@ Item { // In another mode -> switch to clipboard mode PanelService.setLauncherSearchText(screen, ">clip "); } - }); + }, Settings.data.appLauncher.overviewLayer); } function command() { root.screenDetector.withCurrentScreen(screen => { @@ -168,7 +168,7 @@ Item { // In another mode -> switch to clipboard mode launcherPanel.setSearchText(">cmd "); } - }); + }, Settings.data.appLauncher.overviewLayer); } function emoji() { root.screenDetector.withCurrentScreen(screen => { @@ -184,7 +184,7 @@ Item { // In another mode -> switch to emoji mode PanelService.setLauncherSearchText(screen, ">emoji "); } - }); + }, Settings.data.appLauncher.overviewLayer); } function windows() { root.screenDetector.withCurrentScreen(screen => { @@ -204,7 +204,7 @@ Item { // In another mode -> switch to windows mode launcherPanel.setSearchText(">win "); } - }); + }, Settings.data.appLauncher.overviewLayer); } function settings() { root.screenDetector.withCurrentScreen(screen => { @@ -224,7 +224,7 @@ Item { // In another mode -> switch to settings mode launcherPanel.setSearchText(">settings "); } - }); + }, Settings.data.appLauncher.overviewLayer); } }