X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..020707bba9c960c155f4257d9a027d6aecdae5b8:/src/x11/toplevel.cpp diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index fdcf28a869..7ac9f69372 100644 --- a/src/x11/toplevel.cpp +++ b/src/x11/toplevel.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "toplevel.h" #endif @@ -139,7 +139,7 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent, xattributes.override_redirect = True; } - if (HasFlag( wxNO_FULL_REPAINT_ON_RESIZE )) + if (!HasFlag( wxFULL_REPAINT_ON_RESIZE )) { xattributes_mask |= CWBitGravity; xattributes.bit_gravity = NorthWestGravity; @@ -248,7 +248,7 @@ wxTopLevelWindowX11::~wxTopLevelWindowX11() wxTopLevelWindows.DeleteObject(this); // If this is the last top-level window, exit. - if ( wxTheApp && (wxTopLevelWindows.Number() == 0) ) + if ( wxTheApp && (wxTopLevelWindows.GetCount() == 0) ) { wxTheApp->SetTopWindow(NULL); @@ -404,6 +404,13 @@ void wxTopLevelWindowX11::SetIcons(const wxIconBundle& icons ) wxSetIconsX11( wxGlobalDisplay(), GetMainWindow(), icons ); } +bool wxTopLevelWindowX11::SetShape(const wxRegion& region) +{ + return wxDoSetShape( wxGlobalDisplay(), + (Window)GetMainWindow(), + region ); +} + void wxTopLevelWindowX11::SetTitle(const wxString& title) { m_title = title; @@ -662,7 +669,7 @@ struct MwmHints { #define PROP_MOTIF_WM_HINTS_ELEMENTS 5 // Set the window manager decorations according to the -// given wxWindows style +// given wxWidgets style bool wxSetWMDecorations(Window w, long style) { #if wxUSE_NANOX @@ -677,7 +684,7 @@ bool wxSetWMDecorations(Window w, long style) wmProp.flags |= GR_WM_FLAGS_PROPS ; } - if (style & wxSYSTEM_MENU) + if (style & wxCLOSE_BOX) { wmProp.props |= GR_WM_PROPS_CLOSEBOX ; wmProp.flags |= GR_WM_FLAGS_PROPS ; @@ -751,10 +758,10 @@ bool wxSetWMDecorations(Window w, long style) hints.decorations |= MWM_DECOR_TITLE; if ((style & wxSYSTEM_MENU) != 0) - { - hints.functions |= MWM_FUNC_CLOSE; hints.decorations |= MWM_DECOR_MENU; - } + + if ((style & wxCLOSE_BOX) != 0) + hints.functions |= MWM_FUNC_CLOSE; if ((style & wxMINIMIZE_BOX) != 0) {