8000 ENH: add back/forward buttons to osx backend move · QuLogic/matplotlib@c507bd4 · GitHub
[go: up one dir, main page]

Skip to content

Commit c507bd4

Browse files
committed
ENH: add back/forward buttons to osx backend move
closes matplotlib#29045
1 parent cefd73b commit c507bd4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_macosx.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,13 @@ bool mpl_check_button(bool present, PyObject* set, char const* name) {
289289
PyGILState_STATE gstate = PyGILState_Ensure();
290290
PyObject* set = NULL;
291291
NSUInteger buttons = [NSEvent pressedMouseButtons];
292+
292293
if (!(set = PySet_New(NULL))
293294
|| mpl_check_button(buttons & (1 << 0), set, "LEFT")
294295
|| mpl_check_button(buttons & (1 << 1), set, "RIGHT")
295-
|| mpl_check_button(buttons & (1 << 2), set, "MIDDLE")) {
296+
|| mpl_check_button(buttons & (1 << 2), set, "MIDDLE")
297+
|| mpl_check_button(buttons & (1 << 3), set, "BACK")
298+
|| mpl_check_button(buttons & (1 << 4), set, "FORWARD")) {
296299
Py_CLEAR(set); // On failure, return NULL with an exception set.
297300
}
298301
PyGILState_Release(gstate);

0 commit comments

Comments
 (0)
0