Re: gdk_window_at_pointer



On Thu, 2003-04-24 at 12:28, Mathieu Malaterre wrote:
Hi gtk guru,

      I hope my question won't sound too weird, but I am *really* stuck.

      I want to know when a 'gdk_window_at_pointer' call could freeze my X 
session ? I even loose the ability to switching to a console (C+Alt+F1 
...). Before calling it should I check something ?

      BTW if I call 'gdk_flush' (which is BTW a XSync call), the X freeze 
deseapear. But I don't see why I should call this function. Don't take 
me as arrogant but if I should not add gdk_flush this is because it's 
inside the code of wxWindows (which should be safe).

      That said I am working on a class that would link wxWindow (ie wxGTK 
for my case) to VTK (see vtk.org for more info). You'll find the 
beginning of my work on:

http://www.creatis.insa-lyon.fr/~malaterre/wxVTK/

      I don't think this could be usefull for you, anyway this was only to 
give a context to my question.

I fixed this problem in CVS a few weeks ago:

Mon Apr  7 19:43:15 2003  Owen Taylor  <otaylor redhat com>
                                                                                
        * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
        after ungrabbing the server.
  
        * gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
        calls to XFlush().
 
        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
        Use gdk_x11_display_grab/ungrab.

I'd certainly think twice though about using gdk_window_at_pointer(),
however. It's an astonishingly expensive operation, involving a server
grab and multiple round trips to the X server.

Regards,
                                               Owen





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