# HG changeset patch
# User StephaneLenclud
# Date 1426707539 -3600
# Node ID 2e0571e50ab3a7b49a98f43723394358637f8cfb
# Parent 75addfa8520145dbef817263c171849efaca4b79
Trying to fix on bring to foreground mess.
diff -r 75addfa85201 -r 2e0571e50ab3 Server/MainForm.Hid.cs
--- a/Server/MainForm.Hid.cs Wed Mar 18 20:10:38 2015 +0100
+++ b/Server/MainForm.Hid.cs Wed Mar 18 20:38:59 2015 +0100
@@ -20,6 +20,15 @@
[DllImport("USER32.DLL")]
public static extern bool SetForegroundWindow(IntPtr hWnd);
+ [DllImport("USER32.DLL")]
+ public static extern bool BringWindowToTop(IntPtr hWnd);
+
+ [DllImport("USER32.DLL")]
+ public static extern bool IsIconic(IntPtr hWnd);
+
+ [DllImport("USER32.DLL")]
+ public static extern bool OpenIcon(IntPtr hWnd);
+
public delegate void OnHidEventDelegate(object aSender, Hid.Event aHidEvent);
@@ -134,6 +143,13 @@
}
else
{
+ BringWindowToTop(existingProcesses[0].MainWindowHandle);
+ SetForegroundWindow(existingProcesses[0].MainWindowHandle);
+ if (IsIconic(existingProcesses[0].MainWindowHandle))
+ {
+ OpenIcon(existingProcesses[0].MainWindowHandle);
+ }
+ BringWindowToTop(existingProcesses[0].MainWindowHandle);
SetForegroundWindow(existingProcesses[0].MainWindowHandle);
}
}
diff -r 75addfa85201 -r 2e0571e50ab3 Server/SharpDisplayManager.csproj
--- a/Server/SharpDisplayManager.csproj Wed Mar 18 20:10:38 2015 +0100
+++ b/Server/SharpDisplayManager.csproj Wed Mar 18 20:38:59 2015 +0100
@@ -31,7 +31,7 @@
true
index.htm
false
- 1
+ 3
0.3.2.%2a
false
true