summaryrefslogtreecommitdiffstats
path: root/client_examples/gtkvncviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'client_examples/gtkvncviewer.c')
-rw-r--r--client_examples/gtkvncviewer.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/client_examples/gtkvncviewer.c b/client_examples/gtkvncviewer.c
index 9e9e72b..57085a5 100644
--- a/client_examples/gtkvncviewer.c
+++ b/client_examples/gtkvncviewer.c
@@ -26,6 +26,8 @@
static rfbClient *cl;
static gchar *server_cut_text = NULL;
static gboolean framebuffer_allocated = FALSE;
+static GtkWidget *window;
+static GtkWidget *dialog_connecting = NULL;
/* Redraw the screen from the backing pixmap */
static gboolean expose_event (GtkWidget *widget,
@@ -58,6 +60,11 @@ static gboolean expose_event (GtkWidget *widget,
SetFormatAndEncodings (cl);
framebuffer_allocated = TRUE;
+
+ /* Also disable local cursor */
+ GdkCursor* cur = gdk_cursor_new( GDK_BLANK_CURSOR );
+ gdk_window_set_cursor (gtk_widget_get_window(GTK_WIDGET(window)), cur);
+ gdk_cursor_unref( cur );
}
gdk_draw_image (GDK_DRAWABLE (widget->window),
@@ -182,8 +189,6 @@ static void send_crtl_alt_del (GtkMenuItem *menuitem,
SendKeyEvent(cl, XK_Delete, FALSE);
}
-GtkWidget *dialog_connecting = NULL;
-
static void show_connect_window(int argc, char **argv)
{
GtkWidget *label;
@@ -365,7 +370,6 @@ void quit ()
}
static rfbBool resize (rfbClient *client) {
- GtkWidget *window;
GtkWidget *scrolled_window;
GtkWidget *drawing_area=NULL;
static char first=TRUE;
@@ -453,6 +457,11 @@ static rfbBool resize (rfbClient *client) {
}
static void update (rfbClient *cl, int x, int y, int w, int h) {
+ if (dialog_connecting != NULL) {
+ gtk_widget_destroy (dialog_connecting);
+ dialog_connecting = NULL;
+ }
+
GtkWidget *drawing_area = rfbClientGetClientData (cl, gtk_init);
if (drawing_area != NULL)