2.5: Middle mouse button emulation with alt + left mouse button

works again, implemented at windowmanager level this time.
This commit is contained in:
2009-08-18 16:11:53 +00:00
parent 14d33b3c1f
commit b51ebdf0ba

View File

@@ -672,7 +672,19 @@ static int wm_eventmatch(wmEvent *winevent, wmKeymapItem *kmi)
int kmitype= wm_userdef_event_map(kmi->type);
if(kmi->inactive) return 0;
/* exception for middlemouse emulation */
if((U.flag & USER_TWOBUTTONMOUSE) && (kmi->type == MIDDLEMOUSE)) {
if(winevent->type == LEFTMOUSE && winevent->alt) {
wmKeymapItem tmp= *kmi;
tmp.type= winevent->type;
tmp.alt= winevent->alt;
if(wm_eventmatch(winevent, &tmp))
return 1;
}
}
/* the matching rules */
if(kmitype==KM_TEXTINPUT)
if(ISKEYBOARD(winevent->type)) return 1;