Add comment about the meaning of magic number in QWasmEventTranslator
Without this comment, the button == 0 code is very cryptic. This comment helps in deciphering what exactly is being checked. Change-Id: Ied96118362d097d7036bafcc491b8574e1225de1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
73119e27b3
commit
2c648fea57
@ -465,6 +465,11 @@ bool QWasmEventTranslator::processMouse(int eventType, const EmscriptenMouseEven
|
||||
|
||||
pressedButtons.setFlag(button);
|
||||
|
||||
// button overview:
|
||||
// 0 = primary mouse button, usually left click
|
||||
// 1 = middle mouse button, usually mouse wheel
|
||||
// 2 = right mouse button, usually right click
|
||||
// from: https://w3c.github.io/uievents/#dom-mouseevent-button
|
||||
if (mouseEvent->button == 0) {
|
||||
pressedWindow = window2;
|
||||
buttonEventType = QEvent::MouseButtonPress;
|
||||
|
Loading…
x
Reference in New Issue
Block a user