]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/app.cpp
Fix typo in last commit
[wxWidgets.git] / src / x11 / app.cpp
index d2b9c0b3bfb86331fec1ff3a02a3f92579d73c6e..775f77de6b91fd5b4bbd6eab48c07eb7d85e691f 100644 (file)
@@ -100,7 +100,7 @@ bool wxApp::Initialize(int& argC, wxChar **argV)
     {
         if (wxStrcmp( argV[i], wxT("-display") ) == 0)
         {
-            if (i < (argC - 1))
+            if (i < (argCOrig - 1))
             {
                 argV[i++] = NULL;
 
@@ -112,7 +112,7 @@ bool wxApp::Initialize(int& argC, wxChar **argV)
         }
         else if (wxStrcmp( argV[i], wxT("-geometry") ) == 0)
         {
-            if (i < (argC - 1))
+            if (i < (argCOrig - 1))
             {
                 argV[i++] = NULL;
 
@@ -149,12 +149,12 @@ bool wxApp::Initialize(int& argC, wxChar **argV)
 
     if ( argC != argCOrig )
     {
-        // remove the argumens we consumed
+        // remove the arguments we consumed
         for ( int i = 0; i < argC; i++ )
         {
             while ( !argV[i] )
             {
-                memmove(argV + i, argV + i + 1, argCOrig - i);
+                memmove(argV + i, argV + i + 1, (argCOrig - i)*sizeof(wxChar *));
             }
         }
     }
@@ -195,10 +195,8 @@ bool wxApp::Initialize(int& argC, wxChar **argV)
 
 void wxApp::CleanUp()
 {
-    delete wxWidgetHashTable;
-    wxWidgetHashTable = NULL;
-    delete wxClientWidgetHashTable;
-    wxClientWidgetHashTable = NULL;
+    wxDELETE(wxWidgetHashTable);
+    wxDELETE(wxClientWidgetHashTable);
 
     wxAppBase::CleanUp();
 }
@@ -338,7 +336,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
 
                 // If we only have one X11 window, always indicate
                 // that borders might have to be redrawn.
-                if (win->GetMainWindow() == win->GetClientAreaWindow())
+                if (win->X11GetMainWindow() == win->GetClientAreaWindow())
                     win->NeedUpdateNcAreaInIdle();
 
                 // Only erase background, paint in idle time.