[ros-diffs] [tkreuzer] 25422: Don't remove keyboard focus from any other window than the one that was disabled.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Thu Jan 11 00:48:03 CET 2007


Author: tkreuzer
Date: Thu Jan 11 02:48:02 2007
New Revision: 25422

URL: http://svn.reactos.org/svn/reactos?rev=25422&view=rev
Log:
Don't remove keyboard focus from any other window than the one that was disabled.

Modified:
    trunk/reactos/dll/win32/user32/windows/input.c

Modified: trunk/reactos/dll/win32/user32/windows/input.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/input.c?rev=25422&r1=25421&r2=25422&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/input.c (original)
+++ trunk/reactos/dll/win32/user32/windows/input.c Thu Jan 11 02:48:02 2007
@@ -347,9 +347,12 @@
         }
         else
         {
-            /* Remove keyboard focus from that window */
-            SetFocus(NULL);
             Style |= WS_DISABLED;
+            /* Remove keyboard focus from that window if it had focus */
+            if (hWnd == GetFocus())
+            {
+               SetFocus(NULL);
+            }
         }
         NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
 




More information about the Ros-diffs mailing list