[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
{
event.mouse.x -= xpos;
event.mouse.y -= ypos;
int offset = event.what & qe_positional;
if (offset) {
event.mouse.x -= xpos;
event.mouse.y -= ypos;
}
[objects handleEvent: event];
event.mouse.x += xpos;
event.mouse.y += ypos;
if (offset) {
event.mouse.x += xpos;
event.mouse.y += ypos;
}
return self;
}