Mouse crossing fixes from Attilio
svn path=/trunk/; revision=17195
This commit is contained in:
		@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					2007-01-19  Michael Emmel  <mike.emmel@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gdk/directfb/gdkevents-directfb.c: added fixes for window
 | 
				
			||||||
 | 
						crossing events frm Attilio Fiandrotti<attilio.fiandrotti@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2007-01-19  Matthias Clasen  <mclasen@redhat.com>
 | 
					2007-01-19  Matthias Clasen  <mclasen@redhat.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkcalendar.c: Fix build breakage.
 | 
						* gtk/gtkcalendar.c: Fix build breakage.
 | 
				
			||||||
 | 
				
			|||||||
@ -142,7 +142,13 @@ dfb_events_io_func (GIOChannel   *channel,
 | 
				
			|||||||
      switch (event->clazz)
 | 
					      switch (event->clazz)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        case DFEC_WINDOW:
 | 
					        case DFEC_WINDOW:
 | 
				
			||||||
          dfb_events_process_window_event (&event->window);
 | 
					          /* TODO workaround to prevent two DWET_ENTER in a row from being delivered */
 | 
				
			||||||
 | 
					          if (event->window.type == DWET_ENTER ) {
 | 
				
			||||||
 | 
					            if ( i>0 && buf[i-1].window.type != DWET_ENTER )
 | 
				
			||||||
 | 
					              dfb_events_process_window_event (&event->window);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					            dfb_events_process_window_event (&event->window);
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
@ -488,6 +494,10 @@ gdk_event_translate (DFBWindowEvent *dfbevent,
 | 
				
			|||||||
    int wy=_gdk_directfb_mouse_y;
 | 
					    int wy=_gdk_directfb_mouse_y;
 | 
				
			||||||
	child = gdk_directfb_child_at (_gdk_parent_root, &wx, &wy);
 | 
						child = gdk_directfb_child_at (_gdk_parent_root, &wx, &wy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* first let's see if any cossing event has to be send */
 | 
				
			||||||
 | 
					    gdk_directfb_window_send_crossing_events (NULL, child, GDK_CROSSING_NORMAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* then dispatch the motion event to the window the cursor it's inside */
 | 
				
			||||||
	event_win = gdk_directfb_pointer_event_window (child, GDK_MOTION_NOTIFY);
 | 
						event_win = gdk_directfb_pointer_event_window (child, GDK_MOTION_NOTIFY);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -531,8 +541,9 @@ gdk_event_translate (DFBWindowEvent *dfbevent,
 | 
				
			|||||||
	      }
 | 
						      }
 | 
				
			||||||
	  }
 | 
						  }
 | 
				
			||||||
          /* make sure crossing events go to the event window found */
 | 
					          /* make sure crossing events go to the event window found */
 | 
				
			||||||
        GdkWindow *ev_win = ( event_win == NULL ) ? gdk_window_at_pointer (NULL,NULL) :event_win;
 | 
					/*        GdkWindow *ev_win = ( event_win == NULL ) ? gdk_window_at_pointer (NULL,NULL) :event_win;
 | 
				
			||||||
	     gdk_directfb_window_send_crossing_events (NULL,ev_win,GDK_CROSSING_NORMAL);
 | 
						     gdk_directfb_window_send_crossing_events (NULL,ev_win,GDK_CROSSING_NORMAL);
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -660,6 +671,10 @@ gdk_event_translate (DFBWindowEvent *dfbevent,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        child = gdk_directfb_child_at (window, &dfbevent->x, &dfbevent->y);
 | 
					        child = gdk_directfb_child_at (window, &dfbevent->x, &dfbevent->y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* this makes sure pointer is set correctly when it previously left
 | 
				
			||||||
 | 
					         * a window being not standard shaped
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        gdk_window_set_cursor (window, NULL);
 | 
				
			||||||
        gdk_directfb_window_send_crossing_events (NULL, child,
 | 
					        gdk_directfb_window_send_crossing_events (NULL, child,
 | 
				
			||||||
                                                  GDK_CROSSING_NORMAL);
 | 
					                                                  GDK_CROSSING_NORMAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user