[vte/rendering-cleanup] Don't use gdk_drawable_get_size
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/rendering-cleanup] Don't use gdk_drawable_get_size
- Date: Tue, 21 Sep 2010 11:59:12 +0000 (UTC)
commit f6a06fc0bdd2fba1f0df6f9e273af48a7f4436eb
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]