Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse scroll event in Gtk3 backend #3615

Closed
Yves33 opened this issue Oct 3, 2014 · 5 comments
Closed

mouse scroll event in Gtk3 backend #3615

Yves33 opened this issue Oct 3, 2014 · 5 comments
Labels
GUI: gtk status: needs clarification Issues that need more information to resolve.

Comments

@Yves33
Copy link

Yves33 commented Oct 3, 2014

Hello,

as previously reported

The scoll events are not captured in the Gtk3 backend on linux.
in matplotlib / lib / matplotlib / backends / backend_gtk3.py
the event mask is incorrect

event_mask = (Gdk.EventMask.BUTTON_PRESS_MASK |
Gdk.EventMask.BUTTON_RELEASE_MASK |
Gdk.EventMask.EXPOSURE_MASK |
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.KEY_RELEASE_MASK |
Gdk.EventMask.ENTER_NOTIFY_MASK |
Gdk.EventMask.LEAVE_NOTIFY_MASK |
Gdk.EventMask.POINTER_MOTION_MASK |
Gdk.EventMask.POINTER_MOTION_HINT_MASK|
Gdk.EventMask.SCROLL_MASK)

The correct event mask should be

event_mask = (Gdk.EventMask.BUTTON_PRESS_MASK   |
                  Gdk.EventMask.BUTTON_RELEASE_MASK |
                  Gdk.EventMask.SCROLL_MASK         |
                  Gdk.EventMask.EXPOSURE_MASK       |
                  Gdk.EventMask.KEY_PRESS_MASK      |
                  Gdk.EventMask.KEY_RELEASE_MASK    |
                  Gdk.EventMask.ENTER_NOTIFY_MASK   |
                  Gdk.EventMask.LEAVE_NOTIFY_MASK   |
                  Gdk.EventMask.POINTER_MOTION_MASK |
                  Gdk.EventMask.POINTER_MOTION_HINT_MASK)
(note the Gdk.EventMask.SCROLL_MASK)

thanks.

Yves

[TAC edit for markup]

@tacaswell
Copy link
Member

Can you put in a PR (pull request) with that change?

Where was this previously reported?

@tacaswell tacaswell added this to the v1.4.x milestone Oct 3, 2014
@efiring
Copy link
Member

efiring commented Oct 5, 2014

I don't see any difference; I see Gdk.EventMask.SCROLL_MASK in both of your event_mask definitions. It is the last on the list in backend_gtk3.py, and 3rd in the list in your revised version. What am I missing?

@tacaswell tacaswell modified the milestones: v1.4.x, v1.4.2 Oct 17, 2014
@tacaswell tacaswell modified the milestones: v1.5.x, v1.4.x Feb 7, 2015
@tacaswell tacaswell added the status: needs clarification Issues that need more information to resolve. label Feb 7, 2015
@tacaswell tacaswell modified the milestones: unassigned, v1.5.x Feb 7, 2015
@tacaswell
Copy link
Member

@Yves33 any update on this?

@fariza
Copy link
Member

fariza commented May 13, 2016

I'm inclined to close this, we use the mouse scroll events in backend_tools. ZoomPanBase without any problem (Gtk3 backends).

@efiring
Copy link
Member

efiring commented May 14, 2016

Another good catch. Thanks, @fariza.

@efiring efiring closed this as completed May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: gtk status: needs clarification Issues that need more information to resolve.
Projects
None yet
Development

No branches or pull requests

4 participants