]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/evtloop.cpp
Compilation fix.
[wxWidgets.git] / src / motif / evtloop.cpp
index f5f5e000df888c6f56c452d4c5f65b9e789f0cbc..41c575d343da14d0608bed705a54f2c1f64ae877 100644 (file)
@@ -234,7 +234,7 @@ void ProcessXEvent(XEvent* event)
          * window is recieved. Prevents flicker as windows are resized.
          */
 
-        Display *disp = XtDisplay((Widget) wxTheApp->GetTopLevelWidget());
+        Display *disp = event->xany.display;
         Window win = event->xany.window;
         XEvent report;
 
@@ -260,7 +260,7 @@ bool CheckForAccelerator(XEvent* event)
     {
         // Find a wxWindow for this window
         // TODO: should get display for the window, not the current display
-        Widget widget = XtWindowToWidget((Display*) wxGetDisplay(),
+        Widget widget = XtWindowToWidget(event->xany.display,
                                          event->xany.window);
         wxWindow* win = NULL;
 
@@ -294,8 +294,8 @@ bool CheckForKeyDown(XEvent* event)
 {
     if (event->xany.type == KeyPress)
     {
-        Widget widget = XtWindowToWidget((Display*) wxGetDisplay(),
-                     event->xany.window);
+        Widget widget = XtWindowToWidget(event->xany.display,
+                                         event->xany.window);
         wxWindow* win = NULL;
 
         // Find the first wxWindow that corresponds to this event window
@@ -308,7 +308,7 @@ bool CheckForKeyDown(XEvent* event)
         wxKeyEvent keyEvent(wxEVT_KEY_DOWN);
         wxTranslateKeyEvent(keyEvent, win, (Widget) 0, event);
 
-        return win->ProcessEvent( keyEvent );
+        return win->GetEventHandler()->ProcessEvent( keyEvent );
     }
 
     return false;
@@ -320,8 +320,8 @@ bool CheckForKeyUp(XEvent* event)
 {
     if (event->xany.type == KeyRelease)
     {
-        Widget widget = XtWindowToWidget((Display*) wxGetDisplay(),
-                         event->xany.window);
+        Widget widget = XtWindowToWidget(event->xany.display,
+                                         event->xany.window);
         wxWindow* win = NULL;
 
         // Find the first wxWindow that corresponds to this event window
@@ -334,7 +334,7 @@ bool CheckForKeyUp(XEvent* event)
         wxKeyEvent keyEvent(wxEVT_KEY_UP);
         wxTranslateKeyEvent(keyEvent, win, (Widget) 0, event);
 
-        return win->ProcessEvent( keyEvent );
+        return win->GetEventHandler()->ProcessEvent( keyEvent );
     }
 
     return false;