[gtk+/rendering-cleanup: 93/113] gdk: Revert making get_size optional
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 93/113] gdk: Revert making get_size optional
- Date: Wed, 21 Jul 2010 23:29:08 +0000 (UTC)
commit 7a461275f7637d9a8df81daa0fb2ff459dd09b3e
Author: Benjamin Otte <otte redhat com>
Date: Mon Jul 19 13:24:30 2010 +0200
gdk: Revert making get_size optional
49a0ec6e95408e3484397602ad46e274cedbf98b added this hunk without
explanations and it's obviously wrong because failing to have a get_size
vfunc will now not set width and height and they'll end up with invalid
values.
In fact, the GdkDrawableImpl{X11,Win32,Quartz} functions do not have
get_size implemented, so the patch was most likely an attempt to work
around calling this function erroneously on the impl objects.
The correct fix is to call impl->wrapper instead.
gdk/gdkdraw.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index fc32a4c..90b44ba 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -96,8 +96,7 @@ gdk_drawable_get_size (GdkDrawable *drawable,
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
- if (GDK_DRAWABLE_GET_CLASS (drawable)->get_size != NULL)
- GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);
+ GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]