Fixed keyboard events not working on OS X.

This commit is contained in:
Pietro Gagliardi 2016-01-09 15:05:19 -05:00
parent 2a80888cb8
commit dec34670bb
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,13 @@ static BOOL canQuit = NO;
@implementation applicationClass
- (void)sendEvent:(NSEvent *)e
{
if (sendAreaEvents(e) != 0)
return;
[super sendEvent:e];
}
// hey look! we're overriding terminate:!
// we're going to make sure we can go back to main() whether Cocoa likes it or not!
// and just how are we going to do that, hm?

View File

@ -19,7 +19,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMouseEvent *e)
{
printf("mouse (%g,%g):(%g,%g) down:%d up:%d count:%d mods:%x held:%" PRIu64 "x\n",
printf("mouse (%g,%g):(%g,%g) down:%d up:%d count:%d mods:%x held:0x%" PRIX64 "\n",
e->X,
e->Y,
e->AreaWidth,