/////////////////////////////////////////////////////////////////////////////
-// Name: toplevel.cpp
+// Name: src/gtk/toplevel.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "toplevel.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
GdkEvent * WXUNUSED(event),
wxTopLevelWindow *win )
{
- win->SetIconizeState(TRUE);
+ win->SetIconizeState(true);
}
}
}
#endif
-#if GTK_CHECK_VERSION(2,4,0)
+#ifdef __WXGTK24__
if (!gtk_check_version(2,4,0))
{
if (style & wxSTAY_ON_TOP)
{
if (m_grabbed)
{
- wxASSERT_MSG( FALSE, _T("Window still grabbed"));
+ wxASSERT_MSG( false, _T("Window still grabbed"));
RemoveGrab();
}
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+ if ( title == m_title )
+ return;
+
m_title = title;
+
gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
}
#endif
wxgtk_window_set_urgency_hint(GTK_WINDOW( m_widget ), new_hint_value);
}
+
+void wxTopLevelWindowGTK::SetWindowStyleFlag( long style )
+{
+#ifdef __WXGTK20__
+ // Store which styles were changed
+ long styleChanges = style ^ m_windowStyle;
+#endif
+
+ // Process wxWindow styles. This also updates the internal variable
+ // Therefore m_windowStyle bits carry now the _new_ style values
+ wxWindow::SetWindowStyleFlag(style);
+
+#ifdef __WXGTK20__
+ // 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 // GTK+ 2.4
+#if GTK_CHECK_VERSION(2,2,0)
+ if ( (styleChanges & wxFRAME_NO_TASKBAR) && !gtk_check_version(2,2,0) )
+ {
+ gtk_window_set_skip_taskbar_hint(GTK_WINDOW(m_widget), m_windowStyle & wxFRAME_NO_TASKBAR);
+ }
+#endif // GTK+ 2.2
+#endif // GTK+ 2.0
+}