[gtk+] scrolledwindow: Don't displace invalidation by the widget allocation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Don't displace invalidation by the widget allocation
- Date: Mon, 19 Jan 2015 12:12:58 +0000 (UTC)
commit dc952e3d949644b101ab819eca0502a3661e897e
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jan 16 13:18:09 2015 +0100
scrolledwindow: Don't displace invalidation by the widget allocation
This was left unmodified when GtkScrolledWindow was made a windowed widget.
Displacing here by the widget allocation is not necessary anymore, since
we are invalidating the window set at these coordinates.
This patch is a simplification of a previous one by Timm Bäder.
https://bugzilla.gnome.org/show_bug.cgi?id=742243
gtk/gtkscrolledwindow.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 3137779..a93cea9 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -752,19 +752,15 @@ scrolled_window_drag_begin_cb (GtkScrolledWindow *scrolled_window,
static void
gtk_scrolled_window_invalidate_overshoot (GtkScrolledWindow *scrolled_window)
{
- GtkAllocation child_allocation, allocation;
+ GtkAllocation child_allocation;
gint overshoot_x, overshoot_y;
GdkRectangle rect;
if (!_gtk_scrolled_window_get_overshoot (scrolled_window, &overshoot_x, &overshoot_y))
return;
- gtk_widget_get_allocation (GTK_WIDGET (scrolled_window), &allocation);
gtk_scrolled_window_relative_allocation (GTK_WIDGET (scrolled_window),
&child_allocation);
- child_allocation.x += allocation.x;
- child_allocation.y += allocation.y;
-
if (overshoot_x != 0)
{
if (overshoot_x < 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]