mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
IPC: more robust screen detection
This commit is contained in:
@@ -12,8 +12,12 @@ Item {
|
||||
function getActiveScreen() {
|
||||
const activeWindow = ToplevelManager.activeToplevel
|
||||
if (activeWindow && activeWindow.screens.length > 0) {
|
||||
var screen = activeWindow.screens[0]
|
||||
return screen
|
||||
var screenName = activeWindow.screens[0].name
|
||||
for (let i=0; i<Quickshell.screens.length; i++) {
|
||||
if (screenName === Quickshell.screens[i].name) {
|
||||
return Quickshell.screens[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to the primary screen
|
||||
|
||||
Reference in New Issue
Block a user