From 537dc5ecde46d0525c503d1d2b39b6eb89a1298e Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 5 Mar 2007 02:30:56 -0800 Subject: [PATCH] started moving new input code into darwinEvents.c so that it may be shared by the three servers --- hw/darwin/apple/X11Application.m | 19 +++++++++---------- hw/darwin/darwinEvents.c | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 0be1e40b5..c50f70482 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -56,7 +56,7 @@ extern int darwinFakeButtons, input_check_flag; // extern Bool enable_stereo; Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed -static xEvent *quartzEvents; +extern xEvent *darwinEvents; X11Application *X11App; @@ -805,7 +805,6 @@ void X11ApplicationMain (int argc, const char *argv[], pool = [[NSAutoreleasePool alloc] init]; X11App = (X11Application *) [X11Application sharedApplication]; - quartzEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum()); init_ports (); @@ -914,33 +913,33 @@ static void send_nsevent (NSEventType type, NSEvent *e) { button_state |= (1 << ev_button); } else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break; - num_events = GetPointerEvents(quartzEvents, darwinPointer, ev_type, ev_button, + num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button, POINTER_ABSOLUTE, 0, 2, valuators); for(i=0; i 0.0f ? 4 : 5; for (count = fabs(count); count > 0.0; count = count - 1.0f) { - num_events = GetPointerEvents(quartzEvents, darwinPointer, ButtonPress, ev_button, + num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button, POINTER_ABSOLUTE, 0, 2, valuators); for(i=0; i