2.5: Middle mouse button emulation with alt + left mouse button
works again, implemented at windowmanager level this time.
This commit is contained in:
@@ -673,6 +673,18 @@ static int wm_eventmatch(wmEvent *winevent, wmKeymapItem *kmi)
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user