mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
clapper-gtk: video: Fix checks when inhibiting session
This commit is contained in:
@@ -909,7 +909,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
|||||||
|
|
||||||
root = gtk_widget_get_root (GTK_WIDGET (self));
|
root = gtk_widget_get_root (GTK_WIDGET (self));
|
||||||
|
|
||||||
if (!root && !GTK_IS_WINDOW (root)) {
|
if (!root || !GTK_IS_WINDOW (root)) {
|
||||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||||
"without root window", (inhibit) ? "" : "un");
|
"without root window", (inhibit) ? "" : "un");
|
||||||
return;
|
return;
|
||||||
@@ -919,7 +919,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
|||||||
* as it goes away early when unrooting */
|
* as it goes away early when unrooting */
|
||||||
app = g_application_get_default ();
|
app = g_application_get_default ();
|
||||||
|
|
||||||
if (!app && !GTK_IS_APPLICATION (app)) {
|
if (!app || !GTK_IS_APPLICATION (app)) {
|
||||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||||
"without window application set", (inhibit) ? "" : "un");
|
"without window application set", (inhibit) ? "" : "un");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user