[qwaq] Offset event coords only when positional

This fixes pgup/pgdn not working in the editor.
This commit is contained in:
Bill Currie 2020-03-24 13:46:26 +09:00
parent 995074269b
commit 148a351e94

View file

@ -155,11 +155,17 @@
-handleEvent: (qwaq_event_t *) event -handleEvent: (qwaq_event_t *) event
{ {
event.mouse.x -= xpos; int offset = event.what & qe_positional;
event.mouse.y -= ypos;
if (offset) {
event.mouse.x -= xpos;
event.mouse.y -= ypos;
}
[objects handleEvent: event]; [objects handleEvent: event];
event.mouse.x += xpos; if (offset) {
event.mouse.y += ypos; event.mouse.x += xpos;
event.mouse.y += ypos;
}
return self; return self;
} }