Make NS_MOUSE_ENTER and NS_MOUSE_EXIT events behave the same way on X11 platforms as they do on Windows and Mac. b=20022 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-06-22 04:29:59 +00:00
Родитель 842f1f07e7
Коммит f5c953bd6f
3 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -1743,6 +1743,9 @@ nsWidget::OnMotionNotifySignal(GdkEventMotion * aGdkMotionEvent)
/* virtual */ void
nsWidget::OnEnterNotifySignal(GdkEventCrossing * aGdkCrossingEvent)
{
if (aGdkCrossingEvent->subwindow != NULL)
return;
// If there is a button motion target, then we can ignore this
// event since what the gecko event system expects is for
// only motion events to be sent to that widget, even if the
@ -1774,6 +1777,9 @@ nsWidget::OnEnterNotifySignal(GdkEventCrossing * aGdkCrossingEvent)
/* virtual */ void
nsWidget::OnLeaveNotifySignal(GdkEventCrossing * aGdkCrossingEvent)
{
if (aGdkCrossingEvent->subwindow != NULL)
return;
// If there is a button motion target, then we can ignore this
// event since what the gecko event system expects is for
// only motion events to be sent to that widget, even if the

Просмотреть файл

@ -1282,6 +1282,9 @@ nsWindow::OnDeleteEvent(GtkWidget *aWidget, GdkEventAny *aEvent)
void
nsWindow::OnEnterNotifyEvent(GtkWidget *aWidget, GdkEventCrossing *aEvent)
{
if (aEvent->subwindow != NULL)
return;
nsMouseEvent event(NS_MOUSE_ENTER, this);
event.point.x = nscoord(aEvent->x);
@ -1296,6 +1299,9 @@ nsWindow::OnEnterNotifyEvent(GtkWidget *aWidget, GdkEventCrossing *aEvent)
void
nsWindow::OnLeaveNotifyEvent(GtkWidget *aWidget, GdkEventCrossing *aEvent)
{
if (aEvent->subwindow != NULL)
return;
nsMouseEvent event(NS_MOUSE_EXIT, this);
event.point.x = nscoord(aEvent->x);
@ -1828,6 +1834,8 @@ nsWindow::OnDragLeaveEvent(GtkWidget *aWidget,
guint aTime,
gpointer aData)
{
// XXX Do we want to pass this on only if the event's subwindow is null?
LOG(("nsWindow::OnDragLeaveSignal(%p)\n", this));
sIsDraggingOutOf = PR_TRUE;
@ -1993,6 +2001,8 @@ nsWindow::OnDragLeave(void)
void
nsWindow::OnDragEnter(nscoord aX, nscoord aY)
{
// XXX Do we want to pass this on only if the event's subwindow is null?
LOG(("nsWindow::OnDragEnter(%p)\n", this));
nsMouseEvent event(NS_DRAGDROP_ENTER, this);

Просмотреть файл

@ -1024,6 +1024,9 @@ nsAppShell::HandleEnterEvent(XEvent *event, nsWidget *aWidget)
PR_LOG(XlibWidgetsLM, PR_LOG_DEBUG, ("Enter event for window 0x%lx\n",
event->xcrossing.window));
if (event->xcrossing.subwindow != None)
return;
if(is_wm_ungrab_enter(&event->xcrossing))
return;
@ -1052,6 +1055,9 @@ nsAppShell::HandleLeaveEvent(XEvent *event, nsWidget *aWidget)
PR_LOG(XlibWidgetsLM, PR_LOG_DEBUG, ("Leave event for window 0x%lx\n",
event->xcrossing.window));
if (event->xcrossing.subwindow != None)
return;
if(is_wm_grab_leave(&event->xcrossing))
return;