mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-12 14:34:08 +02:00
Only activate parent form in video player if the player window itself is active
This commit is contained in:
parent
eeaf6949c5
commit
fdac42947c
@ -150,7 +150,7 @@ private void timerSync_Tick(object sender, EventArgs e){
|
||||
else if (!isCursorInside && wasCursorInside){
|
||||
wasCursorInside = false;
|
||||
|
||||
if (!Player.fullScreen){
|
||||
if (!Player.fullScreen && Handle == NativeMethods.GetForegroundWindow()){
|
||||
NativeMethods.SetForegroundWindow(ownerHandle);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,9 @@ static class NativeMethods{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT{
|
||||
public int Left;
|
||||
|
Loading…
Reference in New Issue
Block a user