Remove X11-specific wxWindowIsVisible() from common Unix file.

XGetWindowAttributes() used in this function resulted in link problems under
Fedora 14 because we don't explicitly link with libX11. Instead of doing this,
simply get rid of this function as it seems to be used in exactly one place in
wxX11 code only anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-02-14 12:30:43 +00:00
parent df7d641d63
commit 31b81622d3
3 changed files with 4 additions and 11 deletions

View File

@@ -66,9 +66,6 @@ void wxAllocColor(Display *display,Colormap colormap,XColor *xcolor);
// For debugging
wxString wxGetXEventName(XEvent& event);
// Is the window visible?
bool wxWindowIsVisible(Window win);
#if wxUSE_NANOX
#define XEventGetWindow(event) event->general.wid
#define XEventGetType(event) event->general.type

View File

@@ -395,10 +395,3 @@ wxString wxGetXEventName(XEvent& event)
#endif
}
bool wxWindowIsVisible(Window win)
{
XWindowAttributes wa;
XGetWindowAttributes(wxGlobalDisplay(), win, &wa);
return (wa.map_state == IsViewable);
}

View File

@@ -397,7 +397,10 @@ void wxWindowX11::SetFocus()
}
#endif
if (wxWindowIsVisible(xwindow))
XWindowAttributes wa;
XGetWindowAttributes(wxGlobalDisplay(), xwindow, &wa);
if (wa.map_state == IsViewable)
{
wxLogTrace( wxT("focus"), wxT("wxWindowX11::SetFocus: %s"), GetClassInfo()->GetClassName());
// XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );