]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.362 v7.2.362
authorBram Moolenaar <Bram@vim.org>
Wed, 17 Feb 2010 15:31:32 +0000 (16:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 17 Feb 2010 15:31:32 +0000 (16:31 +0100)
Problem:    Win64: Vim doesn't work when cross-compiled with MingW libraries.
Solution:   Instead of handling WM_NCCREATE, create wide text area window
            class if the parent window iw side. (Sergey Khorev)

src/gui_w32.c
src/gui_w48.c
src/version.c

index 5a43d826cdbb2e4baff38cb2223aea1bd188c58e..3331d54dd910f7b4eb2658636431fbe43ba7a325 100644 (file)
@@ -1329,6 +1329,7 @@ gui_mch_init(void)
     WNDCLASS wndclass;
 #ifdef FEAT_MBYTE
     const WCHAR szVimWndClassW[] = VIM_CLASSW;
+    const WCHAR szTextAreaClassW[] = L"VimTextArea";
     WNDCLASSW wndclassw;
 #endif
 #ifdef GLOBAL_IME
@@ -1479,6 +1480,28 @@ gui_mch_init(void)
 #endif
 
     /* Create the text area window */
+#ifdef FEAT_MBYTE
+    if (wide_WindowProc)
+    {
+       if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
+       {
+           wndclassw.style = CS_OWNDC;
+           wndclassw.lpfnWndProc = _TextAreaWndProc;
+           wndclassw.cbClsExtra = 0;
+           wndclassw.cbWndExtra = 0;
+           wndclassw.hInstance = s_hinst;
+           wndclassw.hIcon = NULL;
+           wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
+           wndclassw.hbrBackground = NULL;
+           wndclassw.lpszMenuName = NULL;
+           wndclassw.lpszClassName = szTextAreaClassW;
+
+           if (RegisterClassW(&wndclassw) == 0)
+               return FAIL;
+       }
+    }
+    else
+#endif
     if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
     {
        wndclass.style = CS_OWNDC;
index 40af60fa9f77b09f93f237b4cc74ceeb9eb9f94a..ddaf1fba3bdcf294dfe0c9956d486d6b6754f034 100644 (file)
@@ -1084,13 +1084,6 @@ _TextAreaWndProc(
        case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
            return TRUE;
 #endif
-       /* Workaround for the problem that MyWindowProc() returns FALSE on 64
-        * bit windows when cross-compiled using Mingw libraries. (Andy
-        * Kittner) */
-       case WM_NCCREATE:
-           MyWindowProc(hwnd, uMsg, wParam, lParam);
-           return TRUE;
-
        default:
            return MyWindowProc(hwnd, uMsg, wParam, lParam);
     }
index 89a553d1fd676c376d685325550e8ea5de11e13e..47c1223631fa3e27b33951654bafdbd5a415a4a7 100644 (file)
@@ -681,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    362,
 /**/
     361,
 /**/