GtkLayout - patch



Hi,

when the "adjustment_changed" signal is called while
the widget is frozen and then later thawed, the window
isn't correctly moved according to the adjustment.

Here's a patch:

===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklayout.c,v
retrieving revision 1.31
diff -u -u -r1.31 gtklayout.c
--- gtklayout.c	2000/07/26 11:32:44	1.31
+++ gtklayout.c	2000/07/26 16:06:04
@@ -334,8 +334,18 @@
   g_return_if_fail (GTK_IS_LAYOUT (layout));
 
   if (layout->freeze_count)
-    if (!(--layout->freeze_count))
+    if (!(--layout->freeze_count)) {
+      if (GTK_WIDGET_REALIZED (layout))
+	{
+	  gdk_window_move (layout->bin_window,
+			   - layout->hadjustment->value,
+			   - layout->vadjustment->value);
+
+	  gdk_window_process_updates (layout->bin_window, TRUE);
+	}
+
       gtk_widget_draw (GTK_WIDGET (layout), NULL);
+    }
 }
 
 /* Basic Object handling procedures
===================================================================

Btw. it looks like the `xoffset' and `yoffset' fields aren't used
any longer - is this correct ?

If so, I think we should remove them.

-- 
Martin Baulig
martin@gnome.org (private)
baulig@suse.de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]