Alexandre Julliard : x11drv: Prefer SendMessageW over SendMessageA where possible.

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 11 05:56:10 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 2164815a9ae2196dc3cf76af31522aab0ff8fde2
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=2164815a9ae2196dc3cf76af31522aab0ff8fde2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 10 21:32:56 2006 +0200

x11drv: Prefer SendMessageW over SendMessageA where possible.

---

 dlls/x11drv/event.c  |    2 +-
 dlls/x11drv/winpos.c |   16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/x11drv/event.c b/dlls/x11drv/event.c
index 2271cae..d9488e0 100644
--- a/dlls/x11drv/event.c
+++ b/dlls/x11drv/event.c
@@ -535,7 +535,7 @@ static void EVENT_FocusOut( HWND hwnd, X
         wine_tsx11_unlock();
     }
     if (hwnd != GetForegroundWindow()) return;
-    SendMessageA( hwnd, WM_CANCELMODE, 0, 0 );
+    SendMessageW( hwnd, WM_CANCELMODE, 0, 0 );
 
     /* don't reset the foreground window, if the window which is
        getting the focus is a Wine window */
diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c
index f0fa3b8..5fdde83 100644
--- a/dlls/x11drv/winpos.c
+++ b/dlls/x11drv/winpos.c
@@ -743,7 +743,7 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *win
     {
         /* child windows get WM_CHILDACTIVATE message */
         if ((GetWindowLongW( winpos->hwnd, GWL_STYLE ) & (WS_CHILD | WS_POPUP)) == WS_CHILD)
-            SendMessageA( winpos->hwnd, WM_CHILDACTIVATE, 0, 0 );
+            SendMessageW( winpos->hwnd, WM_CHILDACTIVATE, 0, 0 );
         else
             SetForegroundWindow( winpos->hwnd );
     }
@@ -1102,7 +1102,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent
         WIN_SetStyle( hwnd, style, WS_MINIMIZE );
         WIN_ReleasePtr( win );
 
-        SendMessageA( hwnd, WM_SHOWWINDOW, SW_RESTORE, 0 );
+        SendMessageW( hwnd, WM_SHOWWINDOW, SW_RESTORE, 0 );
         data->lock_changes++;
         SetWindowPos( hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
                       SWP_NOZORDER );
@@ -1137,7 +1137,7 @@ void X11DRV_UnmapNotify( HWND hwnd, XEve
         WIN_ReleasePtr( win );
 
         EndMenu();
-        SendMessageA( hwnd, WM_SHOWWINDOW, SW_MINIMIZE, 0 );
+        SendMessageW( hwnd, WM_SHOWWINDOW, SW_MINIMIZE, 0 );
         data->lock_changes++;
         SetWindowPos( hwnd, 0, 0, 0, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON),
                       SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER );
@@ -1602,7 +1602,7 @@ void X11DRV_SysCommandSizeMove( HWND hwn
     /* repaint the window before moving it around */
     RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
 
-    SendMessageA( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
+    SendMessageW( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
     set_movesize_capture( hwnd );
 
     /* grab the server only when moving top-level windows without desktop */
@@ -1695,7 +1695,7 @@ void X11DRV_SysCommandSizeMove( HWND hwn
                 /* determine the hit location */
                 if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT)
                     wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT);
-                SendMessageA( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect );
+                SendMessageW( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect );
 
                 if (!iconic)
                 {
@@ -1741,8 +1741,8 @@ void X11DRV_SysCommandSizeMove( HWND hwn
     if (HOOK_CallHooks( WH_CBT, HCBT_MOVESIZE, (WPARAM)hwnd, (LPARAM)&sizingRect, TRUE ))
         moved = FALSE;
 
-    SendMessageA( hwnd, WM_EXITSIZEMOVE, 0, 0 );
-    SendMessageA( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
+    SendMessageW( hwnd, WM_EXITSIZEMOVE, 0, 0 );
+    SendMessageW( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
 
     /* window moved or resized */
     if (moved)
@@ -1776,7 +1776,7 @@ void X11DRV_SysCommandSizeMove( HWND hwn
         if( !moved )
         {
             if(style & WS_SYSMENU )
-                SendMessageA( hwnd, WM_SYSCOMMAND,
+                SendMessageW( hwnd, WM_SYSCOMMAND,
                               SC_MOUSEMENU + HTSYSMENU, MAKELONG(pt.x,pt.y));
         }
         else WINPOS_ShowIconTitle( hwnd, TRUE );




More information about the wine-cvs mailing list