[gtk+/wip/frame-window: 2/6] Make gtk_container_propagate_draw work with frame window
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/frame-window: 2/6] Make gtk_container_propagate_draw work with frame window
- Date: Sun, 7 Jul 2013 03:14:08 +0000 (UTC)
commit 91df9735588521c6485039d0de18feec14d2c365
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 5 21:30:04 2013 -0400
Make gtk_container_propagate_draw work with frame window
gtk_container_propagate_draw was not working correctly in this
situation, since it was assuming that the child window is a
descendent of gtk_widget_get_window (container). As a consequence,
we were first adding the toplevel position to the offset, and
then resetting the offset to zero, both of which are not correct.
To fix this, exit the loop when we are hitting a toplevel window.
gtk/gtkcontainer.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 2d6d2df..03b1919 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -3478,6 +3478,11 @@ gtk_container_propagate_draw (GtkContainer *container,
for (w = gtk_widget_get_window (child); w && w != window; w = gdk_window_get_parent (w))
{
int wx, wy;
+
+ if (gdk_window_get_window_type (w) == GDK_WINDOW_TOPLEVEL ||
+ gdk_window_get_window_type (w) == GDK_WINDOW_TEMP)
+ break;
+
gdk_window_get_position (w, &wx, &wy);
x += wx;
y += wy;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]