X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16e8bf31bb4ba1f6374ea86f1ef1dcb1872fda69..19e30148e18cc99296b26503c155e5cef59045f4:/src/motif/frame.cpp diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index cd5b22c681..5092f9fa1a 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -50,6 +50,7 @@ #include #include +#include #if XmVersion >= 1002 #include #else @@ -73,6 +74,7 @@ #endif #include "wx/motif/private.h" +#include "wx/unix/utilsx11.h" // ---------------------------------------------------------------------------- // private functions @@ -627,10 +629,8 @@ void wxFrame::SetTitle(const wxString& title) NULL); } -void wxFrame::SetIcon(const wxIcon& icon) +void wxFrame::DoSetIcon(const wxIcon& icon) { - m_icon = icon; - if (!m_frameShell) return; @@ -640,6 +640,23 @@ void wxFrame::SetIcon(const wxIcon& icon) XtVaSetValues((Widget) m_frameShell, XtNiconPixmap, icon.GetPixmap(), NULL); } +void wxFrame::SetIcon(const wxIcon& icon) +{ + SetIcons( wxIconBundle( icon ) ); +} + +void wxFrame::SetIcons(const wxIconBundle& icons) +{ + wxFrameBase::SetIcons( icons ); + + if (!m_frameShell) + return; + + DoSetIcon( m_icons.GetIcon( -1 ) ); + wxSetIconsX11(GetXDisplay(), + (WXWindow) XtWindow( (Widget) m_frameShell ), icons); +} + void wxFrame::PositionStatusBar() { if (!m_frameStatusBar)