X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ddff00c923d454f651aba32c8fe3654fd303e43..74d283aac44903607326730427b4bbf66dc83a06:/src/x11/utils.cpp?ds=sidebyside diff --git a/src/x11/utils.cpp b/src/x11/utils.cpp index 2f06547b2d..92c6b4c4e3 100644 --- a/src/x11/utils.cpp +++ b/src/x11/utils.cpp @@ -83,65 +83,12 @@ void wxFlushEvents() // ?? } -bool wxCheckForInterrupt(wxWindow *wnd) +bool wxCheckForInterrupt(wxWindow *WXUNUSED(wnd)) { wxFAIL_MSG(wxT("wxCheckForInterrupt not yet implemented.")); return false; } -// ---------------------------------------------------------------------------- -// wxExecute stuff -// ---------------------------------------------------------------------------- - -WX_DECLARE_HASH_MAP( int, wxEndProcessData*, wxIntegerHash, wxIntegerEqual, wxProcMap ); - -static wxProcMap *gs_procmap; - -int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) -{ - if (!gs_procmap) gs_procmap = new wxProcMap(); - (*gs_procmap)[fd] = proc_data; - return 1; -} - -void wxCheckForFinishedChildren() -{ - wxProcMap::iterator it; - if (!gs_procmap) return; - if (gs_procmap->size() == 0) { - // Map empty, delete it. - delete gs_procmap; - gs_procmap = NULL; - return; - } - for (it = gs_procmap->begin();it != gs_procmap->end(); ++it) - { - wxEndProcessData *proc_data = it->second; - int pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); - int status = 0; - // has the process really terminated? - int rc = waitpid(pid, &status, WNOHANG); - if (rc == 0) - continue; // no, it didn't exit yet, continue waiting - - // set exit code to -1 if something bad happened - proc_data->exitcode = rc != -1 && WIFEXITED(status) ? - WEXITSTATUS(status) : -1; - - // child exited, end waiting - close(it->first); - - // don't call us again! - gs_procmap->erase(it->first); - - wxHandleProcessTermination(proc_data); - - // Iterator is invalid. Handle any further children in subsequent - // calls. - break; - } -} - // ---------------------------------------------------------------------------- // misc // ---------------------------------------------------------------------------- @@ -235,17 +182,6 @@ void wxDisplaySizeMM(int *width, int *height) *height = DisplayHeightMM(dpy, DefaultScreen (dpy)); } -void wxClientDisplayRect(int *x, int *y, int *width, int *height) -{ - // This is supposed to return desktop dimensions minus any window - // manager panels, menus, taskbars, etc. If there is a way to do that - // for this platform please fix this function, otherwise it defaults - // to the entire desktop. - if (x) *x = 0; - if (y) *y = 0; - wxDisplaySize(width, height); -} - wxWindow* wxFindWindowAtPoint(const wxPoint& pt) { return wxGenericFindWindowAtPoint(pt);