Re: [gdk/directfb] Wrong GDK events delivered sometimes



Attilio Fiandrotti wrote:
Hi

i recently noticed the directfb backend delivers, in some cases, different gdk events from the x11 backend.

<snip/>

I did some tests with a single toplevel gdkwindow and this is what i got when moving the cursor in and out of the window: the directfb backends produces wrong GDK_LEAVE_NOTIFY events. Here i'm not considering the case of the cursor moving between a toplevel gdkwindow and childs, though problems are known to exist.

I believe the problem is in that gdk_directfb_window_send_crossing_events() function, see the below log. I hope i'll be able to work it out, but a help here would be really welcomed (Sven ?)

Attilio


Step 1: Cursor enters gdkwindow, DWET_ENTER from dfb side

gdk_event_translate():
GdkWindow 134686896 receives DWET_ENTER (x=152, y=299), sending GDK_CROSSING_NORMAL to GdkWindow 134686896
gdk_directfb_window_send_crossing_events ():
         sending GDK_ENTER_NOTIFY to GdkWindow 134686896
Test application: gdkwindow 134686896 sends event GDK_ENTER_NOTIFY

->The gdkwindow emits GDK_ENTER_NOTIFY as expected


Step 2: Cursor moves inside the gdkwindow, DWET_MOTION from dfb side

gdk_event_translate():
GdkWindow 134686896 receives DWET_MOTION (x=150, y=299), sending GDK_CROSSING_NORMAL to GdkWindow 134686720
gdk_directfb_window_send_crossing_events ():
         sending GDK_LEAVE_NOTIFY to 134686896
Test application: gdkwindow 134686896 sends event GDK_LEAVE_NOTIFY

->The gdkwindow emits GDK_LEAVE_NOTIFY: it should not as the cursor is still inside the gdkwindow


Step 3: Cursor moves out of the gdkwindow, DWET_LEAVE from dfb side

gdk_event_translate():
GdkWindow 134686896 receives DWET_LEAVE (x=148, y=301), sending GDK_CROSSING_NORMAL to root GdkWindow

->Now the cursor is really outside of the window, but the gdkwindow did not emit the GDK_LEAVE_NOTIFY signal



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