regedit: focus handling fixes

Dimitrie O. Paun dpaun at rogers.com
Thu Jan 15 23:26:52 CST 2004


ChangeLog
    Thomas Weidenmueller <info at w3seek.de>
    Fixed handling of control focus.

Index: programs/regedit/childwnd.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/childwnd.c,v
retrieving revision 1.5
diff -u -r1.5 childwnd.c
--- programs/regedit/childwnd.c	12 Dec 2003 04:08:59 -0000	1.5
+++ programs/regedit/childwnd.c	16 Jan 2004 05:17:21 -0000
@@ -126,6 +126,7 @@
         pChildWnd->hWnd = hWnd;
         pChildWnd->hTreeWnd = CreateTreeView(hWnd, pChildWnd->szPath, TREE_WINDOW);
         pChildWnd->hListWnd = CreateListView(hWnd, LIST_WINDOW/*, pChildWnd->szPath*/);
+        SetFocus(pChildWnd->hTreeWnd);
         break;
     case WM_COMMAND:
         if (!_CmdWndProc(hWnd, message, wParam, lParam)) {
@@ -243,12 +244,17 @@
 		    }
                 }
                 break;
+	    case NM_SETFOCUS:
+		pChildWnd->nFocusPanel = 1;
+		break;
             default:
                 goto def;
             }
         } else
             if ((int)wParam == LIST_WINDOW) {
-                if (!SendMessage(pChildWnd->hListWnd, message, wParam, lParam)) {
+		if (((LPNMHDR)lParam)->code == NM_SETFOCUS) {
+		    pChildWnd->nFocusPanel = 0;
+		} else if (!SendMessage(pChildWnd->hListWnd, message, wParam, lParam)) {
                     goto def;
                 }
             }
Index: programs/regedit/listview.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/listview.c,v
retrieving revision 1.6
diff -u -r1.6 listview.c
--- programs/regedit/listview.c	16 Jan 2004 02:14:19 -0000	1.6
+++ programs/regedit/listview.c	16 Jan 2004 05:09:42 -0000
@@ -375,7 +370,7 @@
     /* Get the dimensions of the parent window's client area, and create the list view control.  */
     GetClientRect(hwndParent, &rcClient);
     hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"),
-                            WS_VISIBLE | WS_CHILD | LVS_REPORT | LVS_EDITLABELS,
+                            WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS,
                             0, 0, rcClient.right, rcClient.bottom,
                             hwndParent, (HMENU)id, hInst, NULL);
     if (!hwndLV) return NULL;
Index: programs/regedit/main.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/main.c,v
retrieving revision 1.8
diff -u -r1.8 main.c
--- programs/regedit/main.c	16 Jan 2004 02:14:19 -0000	1.8
+++ programs/regedit/main.c	16 Jan 2004 05:04:11 -0000
@@ -186,7 +186,8 @@
 
     /* Main message loop */
     while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
-        if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)) {
+        if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) &&
+	    !IsDialogMessage(hFrameWnd, &msg)) {
             TranslateMessage(&msg);
             DispatchMessage(&msg);
         }


-- 
Dimi.




More information about the wine-patches mailing list