From 5f5aef2b1598ac829b4d12ab484e6e329f8b76d8 Mon Sep 17 00:00:00 2001
From: Roman Dadkov <romand@etersoft.ru>
Date: Fri, 16 Sep 2011 19:03:48 +0400
Subject: [PATCH] comctl32: Restart the wineserver after you have selected the
 necessary drivers (eterbug #6890).

---
 dlls/comctl32/propsheet.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index e6d2d30..8281ad4 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -3136,11 +3136,9 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
 
 	    if (PROPSHEET_Apply(hwnd, wID == IDOK ? 1: 0) == FALSE)
 		break;
-
+	    PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
 	    if (wID == IDOK)
 		{
-                    PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
-
                     /* don't overwrite ID_PSRESTARTWINDOWS or ID_PSREBOOTSYSTEM */
                     if (psInfo->result == 0)
                         psInfo->result = IDOK;
@@ -3152,7 +3150,9 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
 		}
 	    else
 		EnableWindow(hwndApplyBtn, FALSE);
-
+	    if (psInfo->result == ID_PSREBOOTSYSTEM)
+                if (MessageBoxW(hwnd, "The changes you have made require you to restart all Wine programs.\n\nDo this now?", "Change the configuration", MB_YESNO |  MB_ICONQUESTION) == IDYES)
+                    InitiateSystemShutdownExW(NULL, NULL, 0, TRUE, FALSE);
 	    break;
 	}
 
-- 
1.7.6.1
