Re: [Testcase] Re: 32bit scrolling problems in Gtk+ 1.3.1



"David A. Bartold" <foxx mail utexas edu> writes:

> I've isolated the problem to the way the innermost scrolling window's
> size was being set.
> 
> I was calling gdk_window_new () with a width of 1 and afterwards resizing
> the window to a larger width via gtk_queue_resize ().  All this is done in
> the realize function.
> 
> The attached program demonstrates the problem.  GtkFoo is a simple widget
> with two locations of interest: the #defines and the
> gtk_foo_realize () function.  You can compile it by using the command:
> 
>   gcc -o gtkfoo gtkfoo.c `gtk-config-2.0 --cflags --libs`
> 
> As is, it should crash immediately and report an Xlib BadValue error
> (integer parameter out of range).  By changing the INITIAL_WINDOW_WIDTH
> #define and recompiling, you should get different behaviors:
>   1 - 32767:     Doesn't refresh properly when scrolling
>   32768 - 65535: Scrolling works 
>   65536:         Xlib BadValue error (XCreateWindow is being passed
>                    a width parameter of 65536)
>   65537+:        Scrolling works okay I'm guessing (entire range not
>                    tested)
> 
> The refresh problems were what I was noticing.  If you change
> INITIAL_WINDOW_WIDTH to 1, recompile, then drag the scrollbar to
> the center and click on the arrows back and forth, it's apparent
> scrolling is not working properly.

Could you try the following diff. Although I don't see quite
why it would cause all your symtoms, it definely was the
cause of the BadValue, and with it applied, everything seems
to work fine for me.

Regards,
                                        Owen

Index: gdk/x11/gdkwindow-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkwindow-x11.c,v
retrieving revision 1.95
diff -u -r1.95 gdkwindow-x11.c
--- gdk/x11/gdkwindow-x11.c	2000/09/01 20:10:58	1.95
+++ gdk/x11/gdkwindow-x11.c	2000/09/05 19:42:12
@@ -465,8 +465,8 @@
 
   draw_impl->xid = XCreateWindow (GDK_WINDOW_XDISPLAY (parent),
                                   xparent,
-                                  x, y,
-                                  impl->width, impl->height,
+                                  impl->position_info.x, impl->position_info.y,
+                                  impl->position_info.width, impl->position_info.height,
                                   0, depth, class, xvisual,
                                   xattributes_mask, &xattributes);
 




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