if (parent->GetInsertIntoMain())
{
// wxLogDebug( "Inserted into main: %s", GetName().c_str() );
- xparent = (Window) parent->GetMainWindow();
+ xparent = (Window) parent->X11GetMainWindow();
}
// Size (not including the border) must be nonzero (or a Value error results)!
if (g_captureWindow == this)
g_captureWindow = NULL;
- m_isBeingDeleted = true;
-
DestroyChildren();
if (m_clientWindow != m_mainWindow)
if (wxWindowIsVisible(xwindow))
{
- wxLogTrace( _T("focus"), _T("wxWindowX11::SetFocus: %s"), GetClassInfo()->GetClassName());
+ wxLogTrace( wxT("focus"), wxT("wxWindowX11::SetFocus: %s"), GetClassInfo()->GetClassName());
// XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToNone, CurrentTime );
m_needsInputFocus = false;
msg.Printf(wxT("Failed to grab pointer for window %s"), this->GetClassInfo()->GetClassName());
wxLogDebug(msg);
if (res == GrabNotViewable)
+ {
wxLogDebug( wxT("This is not a viewable window - perhaps not shown yet?") );
+ }
g_captureWindow = NULL;
return;
#endif
}
-void wxWindowX11::GetTextExtent(const wxString& string,
- int *x, int *y,
- int *descent, int *externalLeading,
- const wxFont *theFont) const
+void wxWindowX11::DoGetTextExtent(const wxString& string,
+ int *x, int *y,
+ int *descent,
+ int *externalLeading,
+ const wxFont *theFont) const
{
wxFont fontToUse = GetFont();
if (theFont) fontToUse = *theFont;
if (m_clearRegion.IsEmpty()) return;
wxClientDC dc( (wxWindow*)this );
- dc.SetClippingRegion( m_clearRegion );
+ dc.SetDeviceClippingRegion( m_clearRegion );
wxEraseEvent erase_event( GetId(), &dc );
erase_event.SetEventObject( this );
x = sb->GetPosition().x;
Display *xdisplay = wxGlobalDisplay();
- Window xwindow = (Window) GetMainWindow();
+ Window xwindow = (Window) X11GetMainWindow();
Colormap cm = (Colormap) wxTheApp->GetMainColormap( wxGetDisplay() );
wxColour colour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
colour.CalcPixel( (WXColormap) cm );
// X11-specific accessors
// ----------------------------------------------------------------------------
-WXWindow wxWindowX11::GetMainWindow() const
+WXWindow wxWindowX11::X11GetMainWindow() const
{
return m_mainWindow;
}
wxWindow *wxGetActiveWindow()
{
- // TODO
- wxFAIL_MSG(wxT("Not implemented"));
- return NULL;
+ return wxGetTopLevelParent(wxWindow::FindFocus());
}
/* static */
wxWinModule()
{
// we must be cleaned up before the display is closed
- AddDependency(wxClassInfo::FindClass(_T("wxX11DisplayModule")));
+ AddDependency(wxClassInfo::FindClass(wxT("wxX11DisplayModule")));
}
virtual bool OnInit();