[wxGTK] Support changing the wxSTAY_ON_TOP style value run-time through wxWindow::SetWindowStyleFlag, support for

more styles to follow


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2005-11-07 20:00:50 +00:00
parent 56aed4aace
commit 015dca24ca
8 changed files with 58 additions and 2 deletions

View File

@@ -572,7 +572,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
}
#endif
#if GTK_CHECK_VERSION(2,4,0)
#ifdef __WXGTK24__
if (!gtk_check_version(2,4,0))
{
if (style & wxSTAY_ON_TOP)
@@ -1361,3 +1361,22 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags)
#endif
wxgtk_window_set_urgency_hint(GTK_WINDOW( m_widget ), new_hint_value);
}
void wxTopLevelWindowGTK::SetWindowStyleFlag( long style )
{
// Store which styles were changed
long styleChanges = style ^ m_windowStyle;
// Process wxWindow styles. This also updates the internal variable
// Therefore m_windowStyle bits carry now the _new_ style values
wxWindow::SetWindowStyleFlag(style);
// just return for now if widget does not exist yet
if (!m_widget)
return;
#ifdef __WXGTK24__
if ( (styleChanges & wxSTAY_ON_TOP) && !gtk_check_version(2,4,0) )
gtk_window_set_keep_above(GTK_WINDOW(m_widget), m_windowStyle & wxSTAY_ON_TOP);
#endif
}