IPC: more robust screen detection
This commit is contained in:
parent
2fda29c185
commit
3e7ebf44f3
1 changed files with 6 additions and 2 deletions
|
|
@ -12,8 +12,12 @@ Item {
|
||||||
function getActiveScreen() {
|
function getActiveScreen() {
|
||||||
const activeWindow = ToplevelManager.activeToplevel
|
const activeWindow = ToplevelManager.activeToplevel
|
||||||
if (activeWindow && activeWindow.screens.length > 0) {
|
if (activeWindow && activeWindow.screens.length > 0) {
|
||||||
var screen = activeWindow.screens[0]
|
var screenName = activeWindow.screens[0].name
|
||||||
return screen
|
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
|
// Fall back to the primary screen
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue