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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user