mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
move check for event.xbutton.button <= GLUT_MAX_MENUS (see sf bug 1484284)
This commit is contained in:
parent
700359ca5a
commit
1e7d84e258
1 changed files with 6 additions and 2 deletions
|
|
@ -439,11 +439,15 @@ processEventsAndTimeouts(void)
|
|||
} else {
|
||||
window = __glutGetWindow(event.xbutton.window);
|
||||
/* added button check for mice with > 3 buttons */
|
||||
if (window && event.xbutton.button <= GLUT_MAX_MENUS) {
|
||||
if (window) {
|
||||
GLUTmenu *menu;
|
||||
int menuNum;
|
||||
|
||||
menuNum = window->menu[event.xbutton.button - 1];
|
||||
if (event.xbutton.button <= GLUT_MAX_MENUS)
|
||||
menuNum = window->menu[event.xbutton.button - 1];
|
||||
else
|
||||
menuNum = 0;
|
||||
|
||||
/* Make sure that __glutGetMenuByNum is only called if there
|
||||
really is a menu present. */
|
||||
if ((menuNum > 0) && (menu = __glutGetMenuByNum(menuNum))) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue