X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..8cb4919bd4261d98a379b964f3955e2d2d8900f6:/src/x11/utils.cpp diff --git a/src/x11/utils.cpp b/src/x11/utils.cpp index d0360712e4..05aa9ad7ff 100644 --- a/src/x11/utils.cpp +++ b/src/x11/utils.cpp @@ -66,56 +66,14 @@ void wxFlushEvents() XSync (display, FALSE); -#ifdef __WXMOTIF__ - // XtAppPending returns availability of events AND timers/inputs, which - // are processed via callbacks, so XtAppNextEvent will not return if - // there are no events. So added '& XtIMXEvent' - Sergey. - while (XtAppPending ((XtAppContext) wxTheApp->GetAppContext()) & XtIMXEvent) - { - XFlush (XtDisplay ((Widget) wxTheApp->GetTopLevelWidget())); - // Jan Lessner: works better when events are non-X events - XtAppProcessEvent((XtAppContext) wxTheApp->GetAppContext(), XtIMXEvent); - } -#endif -#ifdef __WXX11__ // TODO for X11 // ?? -#endif } bool wxCheckForInterrupt(wxWindow *wnd) { -#ifdef __WXMOTIF__ - wxCHECK_MSG( wnd, FALSE, "NULL window in wxCheckForInterrupt" ); - - Display *dpy=(Display*) wnd->GetXDisplay(); - Window win=(Window) wnd->GetXWindow(); - XEvent event; - XFlush(dpy); - if (wnd->GetMainWidget()) - { - XmUpdateDisplay((Widget)(wnd->GetMainWidget())); - } - - bool hadEvents = FALSE; - while( XCheckMaskEvent(dpy, - ButtonPressMask|ButtonReleaseMask|ButtonMotionMask| - PointerMotionMask|KeyPressMask|KeyReleaseMask, - &event) ) - { - if ( event.xany.window == win ) - { - hadEvents = TRUE; - - XtDispatchEvent(&event); - } - } - - return hadEvents; -#else wxASSERT_MSG(FALSE, "wxCheckForInterrupt not yet implemented."); return FALSE; -#endif } // ---------------------------------------------------------------------------- @@ -124,19 +82,8 @@ bool wxCheckForInterrupt(wxWindow *wnd) int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) { -#ifdef __WXMOTIF__ - XtInputId id = XtAppAddInput((XtAppContext) wxTheApp->GetAppContext(), - fd, - (XtPointer *) XtInputReadMask, - (XtInputCallbackProc) xt_notify_end_process, - (XtPointer) proc_data); - - return (int)id; -#endif -#ifdef __WXX11__ // TODO return 0; -#endif } // ---------------------------------------------------------------------------- @@ -152,7 +99,6 @@ void wxBell() int wxGetOsVersion(int *majorVsn, int *minorVsn) { -#ifdef __WXX11__ if (majorVsn) *majorVsn = 0; @@ -160,7 +106,6 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) *minorVsn = 0; return wxX11; -#endif } // ---------------------------------------------------------------------------- @@ -242,16 +187,7 @@ WXDisplay *wxGetDisplay() { if (gs_currentDisplay) return gs_currentDisplay; -#ifdef __WXMOTIF__ - if (wxTheApp && wxTheApp->GetTopLevelWidget()) - return XtDisplay ((Widget) wxTheApp->GetTopLevelWidget()); - else if (wxTheApp) - return wxTheApp->GetInitialDisplay(); - return NULL; -#endif -#ifdef __WXX11__ return wxApp::GetDisplay(); -#endif } bool wxSetDisplay(const wxString& display_name)