Fix DIALOG_CreateIndirect killing focus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DIALOG_CreateIndirect can incorrectly kill the current input focus.

Dave Hawkes

Index: windows/dialog.c
===================================================================
RCS file: /home/wine/wine/windows/dialog.c,v
retrieving revision 1.95
diff -u -r1.95 dialog.c
--- windows/dialog.c	2001/11/06 20:57:27	1.95
+++ windows/dialog.c	2001/12/05 17:37:23
@@ -885,8 +885,9 @@
         {
             /* check where the focus is again,
 	     * some controls status might have changed in WM_INITDIALOG */
-            dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE); 
-            SetFocus( dlgInfo->hwndFocus );
+            dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
+            if( dlgInfo->hwndFocus )
+                SetFocus( dlgInfo->hwndFocus );
         }
         else
         {
@@ -896,7 +897,8 @@
                 (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
             {
                 dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE); 
-                SetFocus( dlgInfo->hwndFocus );
+                if( dlgInfo->hwndFocus )
+                    SetFocus( dlgInfo->hwndFocus );
             }
         }
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux