[ncmenu_mouse_selected] don't return disabled items #2582

This commit is contained in:
nick black 2022-02-07 09:19:04 -05:00
parent 9647e49cba
commit 6bd7f755f6
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -672,6 +672,9 @@ const char* ncmenu_mouse_selected(const ncmenu* n, const ncinput* click,
return NULL;
}
const int itemidx = y - 2;
if(sec->items[itemidx].disabled){
return NULL;
}
if(ni){
memcpy(ni, &sec->items[itemidx].shortcut, sizeof(*ni));
}