[virt-tools-list] [virt-viewer 1/4] app: Remove VirtViewerApp::has-focus
Christophe Fergeau
cfergeau at redhat.com
Thu Jun 14 16:01:40 UTC 2018
This is no longer needed since 140cb84
'remote-viewer: remove --spice-controller'
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
src/virt-viewer-app.c | 44 -------------------------------------------
1 file changed, 44 deletions(-)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 2a88882..cd0c7ad 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -145,7 +145,6 @@ struct _VirtViewerAppPrivate {
char *title;
char *uuid;
- gint focused;
GKeyFile *config;
gchar *config_file;
@@ -170,7 +169,6 @@ enum {
PROP_FULLSCREEN,
PROP_TITLE,
PROP_ENABLE_ACCEL,
- PROP_HAS_FOCUS,
PROP_KIOSK,
PROP_QUIT_ON_DISCONNECT,
PROP_UUID,
@@ -818,33 +816,6 @@ viewer_window_visible_cb(GtkWidget *widget G_GNUC_UNUSED,
virt_viewer_app_update_menu_displays(VIRT_VIEWER_APP(user_data));
}
-static gboolean
-viewer_window_focus_in_cb(GtkWindow *window G_GNUC_UNUSED,
- GdkEvent *event G_GNUC_UNUSED,
- VirtViewerApp *self)
-{
- self->priv->focused += 1;
-
- if (self->priv->focused == 1)
- g_object_notify(G_OBJECT(self), "has-focus");
-
- return FALSE;
-}
-
-static gboolean
-viewer_window_focus_out_cb(GtkWindow *window G_GNUC_UNUSED,
- GdkEvent *event G_GNUC_UNUSED,
- VirtViewerApp *self)
-{
- self->priv->focused -= 1;
- g_warn_if_fail(self->priv->focused >= 0);
-
- if (self->priv->focused <= 0)
- g_object_notify(G_OBJECT(self), "has-focus");
-
- return FALSE;
-}
-
static gboolean
virt_viewer_app_has_usbredir(VirtViewerApp *self)
{
@@ -881,8 +852,6 @@ virt_viewer_app_window_new(VirtViewerApp *self, gint nth)
g_signal_connect(w, "hide", G_CALLBACK(viewer_window_visible_cb), self);
g_signal_connect(w, "show", G_CALLBACK(viewer_window_visible_cb), self);
- g_signal_connect(w, "focus-in-event", G_CALLBACK(viewer_window_focus_in_cb), self);
- g_signal_connect(w, "focus-out-event", G_CALLBACK(viewer_window_focus_out_cb), self);
return window;
}
@@ -1564,10 +1533,6 @@ virt_viewer_app_get_property (GObject *object, guint property_id,
g_value_set_boolean(value, virt_viewer_app_get_enable_accel(self));
break;
- case PROP_HAS_FOCUS:
- g_value_set_boolean(value, priv->focused > 0);
- break;
-
case PROP_KIOSK:
g_value_set_boolean(value, priv->kiosk);
break;
@@ -1997,15 +1962,6 @@ virt_viewer_app_class_init (VirtViewerAppClass *klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
- g_object_class_install_property(object_class,
- PROP_HAS_FOCUS,
- g_param_spec_boolean("has-focus",
- "Has Focus",
- "Application has focus",
- FALSE,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
g_object_class_install_property(object_class,
PROP_KIOSK,
g_param_spec_boolean("kiosk",
--
2.17.1
More information about the virt-tools-list
mailing list