diff options
author | David Verbeiren <david.verbeiren@intel.com> | 2013-01-08 17:25:31 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2013-01-10 22:00:54 +0100 |
commit | 98d49517edc412b524e8feb9c4568f418a25e0d2 (patch) | |
tree | 5cd37042d5ba09dfb481918dc525efb54894e0a2 /client_examples | |
parent | 55bdab02574e3ac63b7e195e70f3207a88c1e57c (diff) | |
download | libtdevnc-98d49517edc412b524e8feb9c4568f418a25e0d2.tar.gz libtdevnc-98d49517edc412b524e8feb9c4568f418a25e0d2.zip |
gtkvncviewer enhancements
Hide "Connecting" dialog in gtkvncviewer once an update is received.
Hide local cusror in gtkvncviewer.
Diffstat (limited to 'client_examples')
-rw-r--r-- | client_examples/gtkvncviewer.c | 15 |
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) |