summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-18 17:34:33 +0200
committerBenjamin Otte <otte@redhat.com>2010-10-18 19:22:43 +0200
commit206b41c6f67a5381317e273e86119671d7796773 (patch)
tree5d8ca09118b12a2acbc045ce2deb5aa890614506
parentd34b9ed1924bbc9666b6e9f456537319d02d5830 (diff)
downloadgtk+-206b41c6f67a5381317e273e86119671d7796773.tar.gz
widget: Remove special case in gtk_widget_queue_draw_area()
This path would only do anything where widget->window was not located at widget->allocation.x/y but at a different position. This should never happen in the real world. But if it does, GTK3 will break for you. Better fix your widget.
-rw-r--r--gtk/gtkwidget.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 114aafe0a3..45b335a73d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4287,42 +4287,6 @@ gtk_widget_queue_draw_area (GtkWidget *widget,
if (!gtk_widget_get_mapped (w))
return;
- /* Find the correct widget */
-
- if (gtk_widget_get_has_window (widget))
- {
- if (priv->parent)
- {
- /* Translate widget relative to window-relative */
-
- gint wx, wy, wwidth, wheight;
-
- gdk_window_get_position (priv->window, &wx, &wy);
- x -= wx - priv->allocation.x;
- y -= wy - priv->allocation.y;
-
- wwidth = gdk_window_get_width (priv->window);
- wheight = gdk_window_get_height (priv->window);
-
- if (x + width <= 0 || y + height <= 0 ||
- x >= wwidth || y >= wheight)
- return;
-
- if (x < 0)
- {
- width += x; x = 0;
- }
- if (y < 0)
- {
- height += y; y = 0;
- }
- if (x + width > wwidth)
- width = wwidth - x;
- if (y + height > wheight)
- height = wheight - y;
- }
- }
-
invalid_rect.x = x;
invalid_rect.y = y;
invalid_rect.width = width;