[vte] Don't use gdk_drawable_get_size
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Don't use gdk_drawable_get_size
- Date: Sun, 26 Sep 2010 14:25:01 +0000 (UTC)
commit aeb607a958f96648d78496459ca6aebda9fd0324
Author: Christian Persch <chpe gnome org>
Date: Tue Sep 21 13:58:52 2010 +0200
Don't use gdk_drawable_get_size
src/vteaccess.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/vteaccess.c b/src/vteaccess.c
index d7db963..af3887f 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -1735,6 +1735,7 @@ vte_terminal_accessible_get_size(AtkComponent *component,
gint *width, gint *height)
{
GtkWidget *widget;
+ GdkWindow *window;
*width = 0;
*height = 0;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE(component));
@@ -1744,7 +1745,15 @@ vte_terminal_accessible_get_size(AtkComponent *component,
if (!gtk_widget_get_realized(widget)) {
return;
}
- gdk_drawable_get_size(gtk_widget_get_window (widget), width, height);
+ window = gtk_widget_get_window (widget);
+#if GTK_CHECK_VERSION (2, 90, 8)
+ if (width)
+ *width = gdk_window_get_width (window);
+ if (height)
+ *height = gdk_window_get_height (window);
+#else
+ gdk_drawable_get_size(window, width, height);
+#endif
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]