diff --git a/ruamoko/qwaq/qwaq-button.r b/ruamoko/qwaq/qwaq-button.r index 093865576..cece78609 100644 --- a/ruamoko/qwaq/qwaq-button.r +++ b/ruamoko/qwaq/qwaq-button.r @@ -23,6 +23,7 @@ -draw { + [super draw]; [textContext blitFromBuffer: icon[pressed] to: pos from: [icon[pressed] rect]]; diff --git a/ruamoko/qwaq/qwaq-group.r b/ruamoko/qwaq/qwaq-group.r index a358a4f59..48eca7bd6 100644 --- a/ruamoko/qwaq/qwaq-group.r +++ b/ruamoko/qwaq/qwaq-group.r @@ -94,6 +94,12 @@ find_mouse_view(Group *group, Point pos) [[views objectAtIndex:focused] handleEvent: event]; } } else if (event.what & qe_positional) { + Point origin = {}; + if (owner) { + origin = [owner origin]; + } + event.mouse.x -= origin.x; + event.mouse.y -= origin.y; Point pos = {event.mouse.x, event.mouse.y}; if (mouse_grabbed) { [mouse_grabbed handleEvent: event]; @@ -112,6 +118,8 @@ find_mouse_view(Group *group, Point pos) [mouse_within handleEvent: event]; } } + event.mouse.x += origin.x; + event.mouse.y += origin.y; } else { // broadcast [views makeObjectsPerformSelector: @selector(draw) withObject: event];