Re: [gtk-list] Re: slow drags




Owen Taylor writes:
 > You want to be using GDK_POINTER_MOTION_HINT, which says - don't give
 > me another motion event until I ask for it by getting the pointer
 > position. (The shaped window demo in testgtk does this, so take
 > a look at that for example code, but the DND code apparently does not -
 > it should)

Thanks - that was exactly what I wanted.

raster@redhat.com writes:
 > ... The real solution is to check the event
 > queue like follows:
 > 
 > void HandleEvent(XEvent *ev)
 > {
 >    int type;
 > 
 >    type=ev->type;
 >    switch (ev->type)
 >      {
 >        case KeyPress:
 >             break;
 >        case KeyRelease:
 >             break;
 >        case ButtonPress:
 >             HandlePress(ev);
 >             break;
 >        case ButtonRelease:
 >             HandleRelease(ev);
 >             break;
 >        case MotionNotify:
 >              while (XCheckTypedEvent(disp,type,ev));
 >              HandleMotion(ev);
 >              break;
 > 	etc.
 > 

I wanted to try something like this, but couldn't find a gdk
equivalent of XCheckTypedEvent. Is there one?

Thanks, Rupert.

___________________________________________________________________
Rupert Littlewood                      "When I grow up, I'm going to 
rupert@maths.usyd.edu.au              Bovine University" -- R.Wiggum
http://www.maths.usyd.edu.au:8000/u/rupert/




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