[Wine-devel] Eter's patch is applied to winehq repo 03/12/13

builder-robot на etersoft.ru builder-robot на etersoft.ru
Вт Мар 12 23:30:27 MSK 2013


New Etersoft's patches since last build time:
commit ac0738471da49f57105d7d5498603d73fbc650f4
Author: Sergey Guralnik <serhio на etersoft.ru>

    user32: Use window height/width instead of client for combo resizing.

---

commit ac0738471da49f57105d7d5498603d73fbc650f4
Author: Sergey Guralnik <serhio на etersoft.ru>
Date:   Fri Mar 8 22:28:39 2013 +0200

    user32: Use window height/width instead of client for combo resizing.

diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index d20005c..346b346 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1507,7 +1507,7 @@ static void CBResetPos(
 /***********************************************************************
  *           COMBO_Size
  */
-static void COMBO_Size( LPHEADCOMBO lphc, LPARAM lParam )
+static void COMBO_Size( LPHEADCOMBO lphc )
 {
   /*
    * Those controls are always the same height. So we have to make sure
@@ -1515,8 +1515,12 @@ static void COMBO_Size( LPHEADCOMBO lphc, LPARAM lParam )
    */
   if( CB_GETTYPE(lphc) != CBS_SIMPLE )
   {
-    int newComboHeight;
+    int newComboHeight, curComboHeight, curComboWidth;
+    RECT rc;
 
+    GetWindowRect(lphc->self, &rc);
+    curComboHeight = rc.bottom - rc.top;
+    curComboWidth = rc.right - rc.left;
     newComboHeight = CBGetTextAreaHeight(lphc->self, lphc) + 2*COMBO_YBORDERSIZE();
 
     /*
@@ -1527,18 +1531,18 @@ static void COMBO_Size( LPHEADCOMBO lphc, LPARAM lParam )
      * the actual control, for example, to do the layout of a dialog that is
      * resized, the height of the dropdown is not changed.
      */
-    if( HIWORD(lParam) > newComboHeight )
+    if( curComboHeight > newComboHeight )
     {
       TRACE("oldComboHeight=%d, newComboHeight=%d, oldDropBottom=%d, oldDropTop=%d\n",
-            HIWORD(lParam), newComboHeight, lphc->droppedRect.bottom,
+            curComboHeight, newComboHeight, lphc->droppedRect.bottom,
             lphc->droppedRect.top);
-      lphc->droppedRect.bottom = lphc->droppedRect.top + HIWORD(lParam) - newComboHeight;
+      lphc->droppedRect.bottom = lphc->droppedRect.top + curComboHeight - newComboHeight;
     }
     /*
      * Restore original height
      */
-    if( HIWORD(lParam) != newComboHeight )
-      SetWindowPos(lphc->self, 0, 0, 0, LOWORD(lParam), newComboHeight,
+    if( curComboHeight != newComboHeight )
+      SetWindowPos(lphc->self, 0, 0, 0, curComboWidth, newComboHeight,
             SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOREDRAW);
   }
 
@@ -1862,7 +1866,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
 	}
 	case WM_SIZE:
 	        if( lphc->hWndLBox &&
-		  !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc, lParam );
+		  !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc );
 		return  TRUE;
 	case WM_SETFONT:
 		COMBO_Font( lphc, (HFONT)wParam, (BOOL)lParam );


Подробная информация о списке рассылки Wine-devel