mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Remove auto idle inhibit when media is playing
This commit is contained in:
@@ -160,31 +160,6 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convenience functions for common use cases
|
|
||||||
function inhibitForMedia(active = true) {
|
|
||||||
if (active) {
|
|
||||||
addInhibitor("media", "Media playback active")
|
|
||||||
} else {
|
|
||||||
removeInhibitor("media")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function inhibitForPresentation(active = true) {
|
|
||||||
if (active) {
|
|
||||||
addInhibitor("presentation", "Presentation mode")
|
|
||||||
} else {
|
|
||||||
removeInhibitor("presentation")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function inhibitForFullscreen(active = true) {
|
|
||||||
if (active) {
|
|
||||||
addInhibitor("fullscreen", "Fullscreen application")
|
|
||||||
} else {
|
|
||||||
removeInhibitor("fullscreen")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Manual toggle for user control
|
// Manual toggle for user control
|
||||||
function manualToggle() {
|
function manualToggle() {
|
||||||
if (activeInhibitors.includes("manual")) {
|
if (activeInhibitors.includes("manual")) {
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ Singleton {
|
|||||||
property real currentPosition: 0
|
property real currentPosition: 0
|
||||||
property int selectedPlayerIndex: 0
|
property int selectedPlayerIndex: 0
|
||||||
property bool isPlaying: currentPlayer ? currentPlayer.isPlaying : false
|
property bool isPlaying: currentPlayer ? currentPlayer.isPlaying : false
|
||||||
|
|
||||||
// Auto-inhibit idle when media is playing
|
|
||||||
onIsPlayingChanged: {
|
|
||||||
IdleInhibitorService.inhibitForMedia(isPlaying)
|
|
||||||
}
|
|
||||||
property string trackTitle: currentPlayer ? (currentPlayer.trackTitle || "") : ""
|
property string trackTitle: currentPlayer ? (currentPlayer.trackTitle || "") : ""
|
||||||
property string trackArtist: currentPlayer ? (currentPlayer.trackArtist || "") : ""
|
property string trackArtist: currentPlayer ? (currentPlayer.trackArtist || "") : ""
|
||||||
property string trackAlbum: currentPlayer ? (currentPlayer.trackAlbum || "") : ""
|
property string trackAlbum: currentPlayer ? (currentPlayer.trackAlbum || "") : ""
|
||||||
|
|||||||
Reference in New Issue
Block a user