diff --git a/libxapp/xapp-gtk-window.c b/libxapp/xapp-gtk-window.c index e3e41ef..4a433be 100644 --- a/libxapp/xapp-gtk-window.c +++ b/libxapp/xapp-gtk-window.c @@ -169,6 +169,10 @@ update_window_icon (GtkWindow *window, XAppGtkWindowPrivate *priv) { + if (!is_x11_session ()) { + return; + } + /* Icon name/path */ if (priv->icon_name != NULL) { @@ -194,6 +198,10 @@ update_window_progress (GtkWindow *window, XAppGtkWindowPrivate *priv) { + if (!is_x11_session ()) { + return; + } + /* Progress: 0 - 100 */ set_window_hint_cardinal (get_window_xid (window), PROGRESS_HINT, @@ -209,10 +217,6 @@ XAppGtkWindowPrivate *priv, const gchar *icon_name) { - if (!is_x11_session ()) { - goto out; - } - if (g_strcmp0 (icon_name, priv->icon_name) == 0) { gtk_window_set_icon_name (window, icon_name); @@ -235,7 +239,6 @@ update_window_icon (window, priv); } -out: /* Call the GtkWindow method for compatibility */ gtk_window_set_icon_name (GTK_WINDOW (window), icon_name); } @@ -246,10 +249,6 @@ const gchar *file_name, GError **error) { - if (!is_x11_session ()) { - goto out; - } - if (g_strcmp0 (file_name, priv->icon_path) == 0) { gtk_window_set_icon_from_file (window, file_name, error); @@ -272,7 +271,6 @@ update_window_icon (window, priv); } -out: gtk_window_set_icon_from_file (GTK_WINDOW (window), file_name, error); } @@ -281,10 +279,6 @@ XAppGtkWindowPrivate *priv, gint progress) { - if (!is_x11_session ()) { - return; - } - gboolean update; guint clamped_progress; @@ -320,10 +314,6 @@ XAppGtkWindowPrivate *priv, gboolean pulse) { - if (!is_x11_session ()) { - return; - } - gboolean update; update = FALSE;