]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/toplevel.cpp
more DC changes for wxX11
[wxWidgets.git] / src / x11 / toplevel.cpp
index 044a835c7ae5b4ff733c91d0c562cccd9237987a..9d16c98353d23a903409cc1e81a6bcdc17981674 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/toplevel.h"
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
-    #include "wx/toplevel.h"
     #include "wx/string.h"
     #include "wx/log.h"
     #include "wx/intl.h"
@@ -267,7 +268,7 @@ void wxTopLevelWindowX11::OnInternalIdle()
     {
         wxSizeEvent event( GetClientSize(), GetId() );
         event.SetEventObject( this );
-        GetEventHandler()->ProcessEvent( event );
+        HandleWindowEvent( event );
 
         m_needResizeInIdle = false;
     }
@@ -284,7 +285,7 @@ bool wxTopLevelWindowX11::Show(bool show)
         wxSizeEvent event(GetSize(), GetId());
 
         event.SetEventObject(this);
-        GetEventHandler()->ProcessEvent(event);
+        HandleWindowEvent(event);
 
         m_needResizeInIdle = false;
     }
@@ -298,7 +299,7 @@ bool wxTopLevelWindowX11::Show(bool show)
 // wxTopLevelWindowX11 maximize/minimize
 // ----------------------------------------------------------------------------
 
-void wxTopLevelWindowX11::Maximize(bool maximize)
+void wxTopLevelWindowX11::Maximize(bool WXUNUSED(maximize))
 {
     // TODO
 }
@@ -311,6 +312,12 @@ bool wxTopLevelWindowX11::IsMaximized() const
 
 void wxTopLevelWindowX11::Iconize(bool iconize)
 {
+    if ( !iconize )
+    {
+        Restore();
+        return;
+    }
+
     if (!m_iconized && GetMainWindow())
     {
         if (XIconifyWindow(wxGlobalDisplay(),
@@ -372,8 +379,7 @@ void wxTopLevelWindowX11::DoSetIcon(const wxIcon& icon)
 {
     if (icon.Ok() && GetMainWindow())
     {
-#if wxUSE_NANOX
-#else
+#if !wxUSE_NANOX
         XWMHints *wmHints = XAllocWMHints();
         wmHints->icon_pixmap = (Pixmap) icon.GetPixmap();