X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3d8ee42db5e8cad0dceb82ae88e9500a6c08d2f..d7f1759ac12007c85f5e63b66901cde202bf79dc:/src/x11/toplevel.cpp diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index 84ce7c9694..7fcd2b9894 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; @@ -677,7 +684,7 @@ bool wxSetWMDecorations(Window w, long style) wmProp.flags |= GR_WM_FLAGS_PROPS ; } - if (style & wxCLOSE) + if (style & wxCLOSE_BOX) { wmProp.props |= GR_WM_PROPS_CLOSEBOX ; wmProp.flags |= GR_WM_FLAGS_PROPS ; @@ -753,7 +760,7 @@ bool wxSetWMDecorations(Window w, long style) if ((style & wxSYSTEM_MENU) != 0) hints.decorations |= MWM_DECOR_MENU; - if ((style & wxCLOSE) != 0) + if ((style & wxCLOSE_BOX) != 0) hints.functions |= MWM_FUNC_CLOSE; if ((style & wxMINIMIZE_BOX) != 0)