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



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

> On 7 Sep 2000, Owen Taylor wrote:
> 
> > Actually, y == -20 is correct. To briefly explain, window gravity
> > only matters for move_resize or resize operations, not for pure
> > move operations...
> 
> ...
> 
> > Can I ask again what server you are using, to get some idea of
> > the urgency of adding workaround code? 
> 
> That is odd because I am using the same version of XFree86--
> 4.0.1.  The video driver is S3 ViRGE, but I don't think the video driver
> matters.  The scrolling works right using static gravity even though the
> test fails on my machine.  gdk_window_gravity_works () doesn't get called
> at all when the window's initial size is big, so gdk presumes you want to
> use guffaw scrolling.

Forgive my skeptism, but I don't believe that this is possible.

If you are using a recent version of XFree86 for your X server,
gdk_window_gravity_works(), is simply not going to fail.

You are saying that if you apply the appended patch, set the initial
window size in your test case program to 1, run your program, and
move the slider to the middle, it prints:

 Gravity works: NO

?

If that is the case, then somebody royally screwed up in a very
hard to imagine way in the X server. There is no way, with
the XFree 86 server for the driver to influence this, as far
as I know. This code is all in the mi (machine-independent)
layer.

Regards,
                                        Owen

xIndex: 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/07 17:53:46
@@ -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);
 
@@ -2220,6 +2220,7 @@
       gdk_window_destroy (child);
       
       gravity_works = ((y == -20) ? YES : NO);
+      g_print ("Gravity works: %s", gravity_works == YES ? "YES\n" : "NO\n");
     }
   
   return (gravity_works == YES);




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