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



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

> I think I've found the problem.  gdk_window_gravity_works () was
> returning no, y was equal to 20 instead of -20.  I'm pretty sure positive
> 20 is correct because the parent window will be offset -20 and the
> child should stay the same place visually.  So doing a:
> 
> -      gravity_works = ((y == -20) ? YES : NO);
> +      gravity_works = ((y == 20) ? YES : NO);
> 
> in gdk_window_gravity_works () should fix that part of the problem.

Actually, y == -20 is correct. To briefly explain, window gravity
only matters for move_resize or resize operations, not for pure
move operations; so the relevant operation is the resize of 
the parent from

 (0,-10,100,110) => (0,0,100,100)

In this operation, the child, which was originally at 0,0 with
respect to the parent, ends up at 0,-10 with respect to the
parent. 

(This is not simple, and that's presumably why there are buggy
X servers out there.)

 The second part is that performing scrolling when gravity_works = NO
> causes flicker, assuming an attempt is being made for buggy X servers.  I
> tried running ./gtkfoo --sync, and while it flickers, ultimately it will
> update the scrolling window properly.  So I'm guessing a gdk_flush () is
> needed somewhere.

There is currently NO code to preform scrolling when gravity 
works == NO; currently the code in gdkgeometry-x11.c just ignores
the return code from gdk_window_set_static_gravities. If 
it even is close to working, that's a suprise to me.

Can I ask again what server you are using, to get some idea of
the urgency of adding workaround code? 

(GtkLayout dependend on the same techniques, and also had no fallback
code, and I've never seen any bug reports of problems with, say, the
GNOME canvas, so broken servers can't be that common.)

I do have to dive back into gdkgeometry-x11.c at some point
to finish off gdk_window_scroll(), so I probably can look at
fixing this then. 

Regards,
                                        Owen




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