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:
@@ -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
|
||||
|
@@ -395,10 +395,3 @@ wxString wxGetXEventName(XEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxWindowIsVisible(Window win)
|
||||
{
|
||||
XWindowAttributes wa;
|
||||
XGetWindowAttributes(wxGlobalDisplay(), win, &wa);
|
||||
|
||||
return (wa.map_state == IsViewable);
|
||||
}
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user