[vinagre] Implement get_dimensions() virtual function for RDP



commit c98a16a795eced4aa0b696edf92f6b54d85de931
Author: Jonh Wendell <jonh wendell intel com>
Date:   Thu Aug 1 13:05:50 2013 -0300

    Implement get_dimensions() virtual function for RDP
    
    This is used in fullscreen mode to check whether show the
    scrollbars, and might lead to a corrupt fullscreen state
    in some cases.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=580679

 plugins/rdp/vinagre-rdp-tab.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
index 0360ef3..abe33e1 100644
--- a/plugins/rdp/vinagre-rdp-tab.c
+++ b/plugins/rdp/vinagre-rdp-tab.c
@@ -56,6 +56,16 @@ rdp_tab_get_tooltip (VinagreTab *tab)
 }
 
 static void
+rdp_tab_get_dimensions (VinagreTab *tab, int *w, int *h)
+{
+  VinagreRdpTab *rdp_tab = VINAGRE_RDP_TAB (tab);
+  GdkWindow *window = gtk_widget_get_window (rdp_tab->priv->box);
+
+  *w = gdk_window_get_width (window);
+  *h = gdk_window_get_height (window);
+}
+
+static void
 emit_connected_signal (GtkSocket *socket, VinagreRdpTab *rdp_tab)
 {
   g_signal_emit_by_name (rdp_tab, "tab-initialized");
@@ -186,6 +196,7 @@ vinagre_rdp_tab_class_init (VinagreRdpTabClass *klass)
   object_class->dispose = vinagre_rdp_tab_dispose;
 
   tab_class->impl_get_tooltip = rdp_tab_get_tooltip;
+  tab_class->impl_get_dimensions = rdp_tab_get_dimensions;
 
   g_type_class_add_private (object_class, sizeof (VinagreRdpTabPrivate));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]