old = XSetErrorHandler(ErrorHandler);
XReparentWindow( wxGlobalDisplay(),
- (Window) toReparent->GetMainWindow(),
- (Window) newParent->GetMainWindow(),
+ (Window) toReparent->X11GetMainWindow(),
+ (Window) newParent->X11GetMainWindow(),
0, 0);
if (!XQueryTree( wxGlobalDisplay(),
- (Window) toReparent->GetMainWindow(),
+ (Window) toReparent->X11GetMainWindow(),
&returnroot, &returnparent,
&children, &numchildren) || Xerror)
{
"Reparenting child at offset %d and position %d, %d.\n",
parentOffset, parentOffset+xwa.x, parentOffset+xwa.y);
XReparentWindow( wxGlobalDisplay(),
- children[each], (Window) newParent->GetMainWindow(),
+ children[each], (Window) newParent->X11GetMainWindow(),
xwa.x, xwa.y);
}
}
{
if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)
{
- if (GetParent() && GetParent()->GetMainWindow())
+ if (GetParent() && GetParent()->X11GetMainWindow())
{
- Window xparentwindow = (Window) GetParent()->GetMainWindow();
+ Window xparentwindow = (Window) GetParent()->X11GetMainWindow();
XSetTransientForHint( xdisplay, xwindow, xparentwindow );
}
}
if (GetParent())
{
wm_hints.flags |= WindowGroupHint;
- wm_hints.window_group = (Window) GetParent()->GetMainWindow();
+ wm_hints.window_group = (Window) GetParent()->X11GetMainWindow();
}
wm_hints.input = True;
wm_hints.initial_state = NormalState;
return;
}
- if (!m_iconized && GetMainWindow())
+ if (!m_iconized && X11GetMainWindow())
{
if (XIconifyWindow(wxGlobalDisplay(),
- (Window) GetMainWindow(), DefaultScreen(wxGlobalDisplay())) != 0)
+ (Window) X11GetMainWindow(), DefaultScreen(wxGlobalDisplay())) != 0)
m_iconized = true;
}
}
void wxTopLevelWindowX11::Restore()
{
// This is the way to deiconify the window, according to the X FAQ
- if (m_iconized && GetMainWindow())
+ if (m_iconized && X11GetMainWindow())
{
- XMapWindow(wxGlobalDisplay(), (Window) GetMainWindow());
+ XMapWindow(wxGlobalDisplay(), (Window) X11GetMainWindow());
m_iconized = false;
}
}
void wxTopLevelWindowX11::DoSetIcon(const wxIcon& icon)
{
- if (icon.Ok() && GetMainWindow())
+ if (icon.Ok() && X11GetMainWindow())
{
#if !wxUSE_NANOX
XWMHints *wmHints = XAllocWMHints();
wmHints->icon_mask = (Pixmap) icon.GetMask()->GetBitmap();
}
- XSetWMHints(wxGlobalDisplay(), (Window) GetMainWindow(), wmHints);
+ XSetWMHints(wxGlobalDisplay(), (Window) X11GetMainWindow(), wmHints);
XFree(wmHints);
#endif
}
wxTopLevelWindowBase::SetIcons( icons );
DoSetIcon( icons.GetIcon( -1 ) );
- wxSetIconsX11( wxGlobalDisplay(), GetMainWindow(), icons );
+ wxSetIconsX11( wxGlobalDisplay(), X11GetMainWindow(), icons );
}
bool wxTopLevelWindowX11::SetShape(const wxRegion& region)
{
return wxDoSetShape( wxGlobalDisplay(),
- (Window)GetMainWindow(),
+ (Window)X11GetMainWindow(),
region );
}
{
m_title = title;
- if (GetMainWindow())
+ if (X11GetMainWindow())
{
#if wxUSE_UNICODE
// I wonder of e.g. Metacity takes UTF-8 here
- XStoreName(wxGlobalDisplay(), (Window) GetMainWindow(),
+ XStoreName(wxGlobalDisplay(), (Window) X11GetMainWindow(),
(const char*) title.ToAscii() );
- XSetIconName(wxGlobalDisplay(), (Window) GetMainWindow(),
+ XSetIconName(wxGlobalDisplay(), (Window) X11GetMainWindow(),
(const char*) title.ToAscii() );
#else
- XStoreName(wxGlobalDisplay(), (Window) GetMainWindow(),
+ XStoreName(wxGlobalDisplay(), (Window) X11GetMainWindow(),
(const char*) title);
- XSetIconName(wxGlobalDisplay(), (Window) GetMainWindow(),
+ XSetIconName(wxGlobalDisplay(), (Window) X11GetMainWindow(),
(const char*) title);
#endif
}
size_hints.flags = PSize;
size_hints.width = width;
size_hints.height = height;
- XSetWMNormalHints( wxGlobalDisplay(), (Window) GetMainWindow(), &size_hints );
+ XSetWMNormalHints( wxGlobalDisplay(), (Window) X11GetMainWindow(), &size_hints );
#endif
wxWindowX11::DoSetClientSize(width, height);
size_hints.y = m_y;
size_hints.width = m_width;
size_hints.height = m_height;
- XSetWMNormalHints( wxGlobalDisplay(), (Window) GetMainWindow(), &size_hints);
+ XSetWMNormalHints( wxGlobalDisplay(), (Window) X11GetMainWindow(), &size_hints);
#endif
wxWindowX11::DoSetSize(x, y, width, height, sizeFlags);
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)!
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;
}