X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..3f4880a451af5b982e775acae7f316793c3df0b5:/src/x11/toplevel.cpp diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index 9d16c98353..5da3d5b3b7 100644 --- a/src/x11/toplevel.cpp +++ b/src/x11/toplevel.cpp @@ -6,7 +6,7 @@ // Created: 24.09.01 // RCS-ID: $Id$ // Copyright: (c) 2002 Julian Smart -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -198,9 +198,9 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent, { 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 ); } } @@ -220,7 +220,7 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent, 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; @@ -318,10 +318,10 @@ void wxTopLevelWindowX11::Iconize(bool iconize) 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; } } @@ -334,9 +334,9 @@ bool wxTopLevelWindowX11::IsIconized() const 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; } } @@ -377,7 +377,7 @@ bool wxTopLevelWindowX11::ShowFullScreen(bool show, long style) void wxTopLevelWindowX11::DoSetIcon(const wxIcon& icon) { - if (icon.Ok() && GetMainWindow()) + if (icon.IsOk() && X11GetMainWindow()) { #if !wxUSE_NANOX XWMHints *wmHints = XAllocWMHints(); @@ -391,7 +391,7 @@ void wxTopLevelWindowX11::DoSetIcon(const wxIcon& icon) wmHints->icon_mask = (Pixmap) icon.GetMask()->GetBitmap(); } - XSetWMHints(wxGlobalDisplay(), (Window) GetMainWindow(), wmHints); + XSetWMHints(wxGlobalDisplay(), (Window) X11GetMainWindow(), wmHints); XFree(wmHints); #endif } @@ -403,13 +403,13 @@ void wxTopLevelWindowX11::SetIcons(const wxIconBundle& icons ) 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 ); } @@ -417,18 +417,18 @@ void wxTopLevelWindowX11::SetTitle(const wxString& title) { 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 } @@ -484,7 +484,7 @@ void wxTopLevelWindowX11::DoSetClientSize(int width, int height) 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); @@ -523,7 +523,7 @@ void wxTopLevelWindowX11::DoSetSize(int x, int y, int width, int height, int siz 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); @@ -693,8 +693,7 @@ bool wxSetWMDecorations(Window w, long style) } if ((style & wxCAPTION) || - (style & wxTINY_CAPTION_HORIZ) || - (style & wxTINY_CAPTION_VERT)) + (style & wxTINY_CAPTION)) { wmProp.props |= GR_WM_PROPS_CAPTION ; wmProp.flags |= GR_WM_FLAGS_PROPS ;