mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Uninhibit screen when video is not playing
This functionality was broken before GTK 4.0.0, so it needs a minimal required GTK version bump
This commit is contained in:
@@ -57,12 +57,10 @@ function inhibitForState(state, window)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
let app = window.get_application();
|
let app = window.get_application();
|
||||||
let flags = Gtk.ApplicationInhibitFlags.SUSPEND
|
|
||||||
| Gtk.ApplicationInhibitFlags.IDLE;
|
|
||||||
|
|
||||||
inhibitCookie = app.inhibit(
|
inhibitCookie = app.inhibit(
|
||||||
window,
|
window,
|
||||||
flags,
|
Gtk.ApplicationInhibitFlags.IDLE,
|
||||||
'video is playing'
|
'video is playing'
|
||||||
);
|
);
|
||||||
if(!inhibitCookie)
|
if(!inhibitCookie)
|
||||||
@@ -71,14 +69,12 @@ function inhibitForState(state, window)
|
|||||||
isInhibited = (inhibitCookie > 0);
|
isInhibited = (inhibitCookie > 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//if(!inhibitCookie)
|
if(!inhibitCookie)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Uninhibit seems to be broken as of GTK 3.99.4
|
|
||||||
let app = window.get_application();
|
let app = window.get_application();
|
||||||
app.uninhibit(inhibitCookie);
|
app.uninhibit(inhibitCookie);
|
||||||
inhibitCookie = null;
|
inhibitCookie = null;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
debug(`set prevent suspend to: ${isInhibited}`);
|
debug(`set prevent suspend to: ${isInhibited}`);
|
||||||
|
@@ -27,7 +27,7 @@ arch=(any)
|
|||||||
url="https://github.com/Rafostar/clapper"
|
url="https://github.com/Rafostar/clapper"
|
||||||
license=("GPL-3.0")
|
license=("GPL-3.0")
|
||||||
depends=(
|
depends=(
|
||||||
"gtk4>=3.99.2"
|
"gtk4>=4.0.0"
|
||||||
"hicolor-icon-theme"
|
"hicolor-icon-theme"
|
||||||
"gjs"
|
"gjs"
|
||||||
"gst-plugins-base-libs>=1.18.0"
|
"gst-plugins-base-libs>=1.18.0"
|
||||||
|
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 10),
|
|||||||
Package: clapper
|
Package: clapper
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: gjs (>= 1.50),
|
Depends: gjs (>= 1.50),
|
||||||
gir1.2-gtk-4.0 (>= 3.99.2),
|
gir1.2-gtk-4.0 (>= 4.0.0),
|
||||||
hicolor-icon-theme,
|
hicolor-icon-theme,
|
||||||
libgstreamer1.0-0 (>= 1.18),
|
libgstreamer1.0-0 (>= 1.18),
|
||||||
gstreamer1.0-plugins-base (>= 1.18),
|
gstreamer1.0-plugins-base (>= 1.18),
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
%global appname com.github.rafostar.Clapper
|
%global appname com.github.rafostar.Clapper
|
||||||
%global gst_version 1.18.0
|
%global gst_version 1.18.0
|
||||||
%global gtk4_version 3.99.2
|
%global gtk4_version 4.0.0
|
||||||
|
|
||||||
Name: clapper
|
Name: clapper
|
||||||
Version: 0.0.0
|
Version: 0.0.0
|
||||||
|
Reference in New Issue
Block a user