Bug #656

GDK_LEAVE_NOTIFY dosen't refresh the state of ctrls (GTK Backend)

Added by Zbigniew Rebacz about 10 years ago. Updated about 10 years ago.

Status:ApprovedStart date:01/20/2014
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CtrlCoreSpent time:-
Target version:-

Description

It seems that ctrls don't recive mouse event when pointer leaves the window area. This bug can be observed while using menubars when Standard theme is enable. I think we should handle mouse events when pointer leaves window area.

(CtrlCore/GtkEvent.cpp - line 136):

    case GDK_LEAVE_NOTIFY:
        EventMouseValid = false;
    case GDK_MOTION_NOTIFY: {
        GdkEventMotion *e = (GdkEventMotion *)event;
        DoMouseEvent(e->state, Point((int)e->x_root, (int)e->y_root));
        break;
    }

instead of:

    case GDK_LEAVE_NOTIFY:
        EventMouseValid = false;
        return false; // <- MouseLeave() never be executed!
    case GDK_MOTION_NOTIFY: {
        GdkEventMotion *e = (GdkEventMotion *)event;
        DoMouseEvent(e->state, Point((int)e->x_root, (int)e->y_root));
        break;
    }

GtkEvent.cpp Magnifier (15.3 KB) Zbigniew Rebacz, 01/20/2014 08:31 PM

History

#1 Updated by Miroslav Fidler about 10 years ago

  • Status changed from Patch ready to In Progress
  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

Well, mouse-leave is normally checked using periodic timer (this is to support platforms lacking proper inputs).

However, a week or two back I was fixing/refactoring related issue there (e.g. EventMouseValid no longer exists). Can you please check if it works now (without applying this patch)?

#2 Updated by Zbigniew Rebacz about 10 years ago

  • Status changed from In Progress to Patch ready
  • Assignee changed from Zbigniew Rebacz to Miroslav Fidler
Can you please check if it works now (without applying this patch)?

No it dosen't.

I think that we should remove "return false" instruction. Finally, the code should look like this:

    case GDK_LEAVE_NOTIFY:
    case GDK_MOTION_NOTIFY: {
        GdkEventMotion *e = (GdkEventMotion *)event;
        DoMouseEvent(e->state, Point((int)e->x_root, (int)e->y_root));
        break;
    }

#3 Updated by Miroslav Fidler about 10 years ago

  • Status changed from Patch ready to Approved

Also available in: Atom PDF