pull up r20570 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 11 Aug 2008 15:08:03 +0000 (15:08 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 11 Aug 2008 15:08:03 +0000 (15:08 +0000)
 r20570@cathode-dark-space:  jaltman | 2008-07-23 10:38:27 -0400
 ticket: 5605
 tags: pullup

 cw_handle_header_msg():

 The behavior of the HDN_ENDTRACK notification has changed slightly on
 Vista.  HDM_GETITEMRECT, when used while handling HDN_ENDTRACK, returns
 the item extents that were there prior to the user starting the resizing
 operation.  Earlier it would return the extents that resulted from the
 resizing operation.

 This resulted in a visual update problem on Windows Vista/2008
 in the NIM Advanced View.

ticket: 5605
version_fixed: 1.6.4
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@20638 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/identity/ui/credwnd.c

index 5b246806d88b90787091db49a7fdace0f7a71171..c5eb0d1477d9cfc0fc65f4ca6f1d307e179e3a5a 100644 (file)
@@ -2784,7 +2784,6 @@ cw_draw_header(HDC hdc,
 
 LRESULT 
 cw_handle_header_msg(khui_credwnd_tbl * tbl, LPNMHEADER ph) {
-    RECT r;
     HDITEM hi;
 
     switch(ph->hdr.code) {
@@ -2807,13 +2806,10 @@ cw_handle_header_msg(khui_credwnd_tbl * tbl, LPNMHEADER ph) {
 
     case HDN_ENDTRACK:
         {
-            int width;
             hi.mask = HDI_ORDER;
             Header_GetItem(ph->hdr.hwndFrom, ph->iItem, &hi);
-            Header_GetItemRect(ph->hdr.hwndFrom, ph->iItem, &r);
-            width = r.right - r.left;
-            if(width != tbl->cols[hi.iOrder].width) {
-                tbl->cols[hi.iOrder].width = width;
+            if(ph->pitem->cxy != tbl->cols[hi.iOrder].width) {
+                tbl->cols[hi.iOrder].width = ph->pitem->cxy;
                 cw_update_extents(tbl, TRUE);
                 InvalidateRect(tbl->hwnd, NULL, FALSE);
             }