|
|
9ff4aa |
From 81129f8eb11e86ccc9329b5a7cb4e319a4db7e04 Mon Sep 17 00:00:00 2001
|
|
|
9ff4aa |
From: Victor Toso <victortoso@redhat.com>
|
|
|
9ff4aa |
Date: Mon, 8 Mar 2021 16:52:06 +0100
|
|
|
9ff4aa |
Subject: [PATCH] build: fix build without gtk-vnc
|
|
|
9ff4aa |
|
|
|
9ff4aa |
Without gtk-vnc we get implicit function declaration for
|
|
|
9ff4aa |
VIRT_VIEWER_IS_SESSION_VNC. Introduced at 8bc91ac "session: remove
|
|
|
9ff4aa |
"session-error" signal" in 2021-02-18
|
|
|
9ff4aa |
|
|
|
9ff4aa |
As we are already using #ifdef here, I've also changed the ternary to
|
|
|
9ff4aa |
an if for clarity.
|
|
|
9ff4aa |
|
|
|
9ff4aa |
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
9ff4aa |
---
|
|
|
9ff4aa |
src/virt-viewer-app.c | 16 ++++++++++++----
|
|
|
9ff4aa |
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
|
9ff4aa |
|
|
|
9ff4aa |
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
|
|
|
9ff4aa |
index 5d3b395..b20d11a 100644
|
|
|
9ff4aa |
--- a/src/virt-viewer-app.c
|
|
|
9ff4aa |
+++ b/src/virt-viewer-app.c
|
|
|
9ff4aa |
@@ -748,8 +748,12 @@ static void hide_one_window(gpointer value,
|
|
|
9ff4aa |
{
|
|
|
9ff4aa |
VirtViewerApp* self = VIRT_VIEWER_APP(user_data);
|
|
|
9ff4aa |
VirtViewerAppPrivate *priv = self->priv;
|
|
|
9ff4aa |
- gboolean connect_error = !priv->cancelled &&
|
|
|
9ff4aa |
- !(VIRT_VIEWER_IS_SESSION_VNC(priv->session) ? priv->initialized : priv->connected);
|
|
|
9ff4aa |
+ gboolean connect_error = !priv->cancelled && !priv->connected;
|
|
|
9ff4aa |
+#ifdef HAVE_GTK_VNC
|
|
|
9ff4aa |
+ if (VIRT_VIEWER_IS_SESSION_VNC(priv->session)) {
|
|
|
9ff4aa |
+ connect_error = !priv->cancelled && !priv->initialized;
|
|
|
9ff4aa |
+ }
|
|
|
9ff4aa |
+#endif
|
|
|
9ff4aa |
|
|
|
9ff4aa |
if (connect_error || self->priv->main_window != value)
|
|
|
9ff4aa |
virt_viewer_window_hide(VIRT_VIEWER_WINDOW(value));
|
|
|
9ff4aa |
@@ -1773,8 +1777,12 @@ virt_viewer_app_disconnected(VirtViewerSession *session G_GNUC_UNUSED, const gch
|
|
|
9ff4aa |
VirtViewerApp *self)
|
|
|
9ff4aa |
{
|
|
|
9ff4aa |
VirtViewerAppPrivate *priv = self->priv;
|
|
|
9ff4aa |
- gboolean connect_error = !priv->cancelled &&
|
|
|
9ff4aa |
- !(VIRT_VIEWER_IS_SESSION_VNC(session) ? priv->initialized : priv->connected);
|
|
|
9ff4aa |
+ gboolean connect_error = !priv->cancelled && !priv->connected;
|
|
|
9ff4aa |
+#ifdef HAVE_GTK_VNC
|
|
|
9ff4aa |
+ if (VIRT_VIEWER_IS_SESSION_VNC(priv->session)) {
|
|
|
9ff4aa |
+ connect_error = !priv->cancelled && !priv->initialized;
|
|
|
9ff4aa |
+ }
|
|
|
9ff4aa |
+#endif
|
|
|
9ff4aa |
|
|
|
9ff4aa |
if (!priv->kiosk)
|
|
|
9ff4aa |
virt_viewer_app_hide_all_windows(self);
|
|
|
9ff4aa |
--
|
|
|
9ff4aa |
2.29.2
|
|
|
9ff4aa |
|