From f55dfa7a73590c92d96009dbc56bd8a99c2155c9 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Sun, 20 Jun 2021 11:29:58 +0200 Subject: [PATCH] misc --- src/Misc/Commands.cs | 5 +++++ src/Misc/CorePlayer.cs | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Misc/Commands.cs b/src/Misc/Commands.cs index dc4954e..d3afbf9 100644 --- a/src/Misc/Commands.cs +++ b/src/Misc/Commands.cs @@ -392,5 +392,10 @@ namespace mpvnet } } } + + public static void ShowCommandPalette() + { + + } } } diff --git a/src/Misc/CorePlayer.cs b/src/Misc/CorePlayer.cs index 328eb9a..f248419 100644 --- a/src/Misc/CorePlayer.cs +++ b/src/Misc/CorePlayer.cs @@ -349,14 +349,18 @@ namespace mpvnet { WindowHandle = Native.FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null); - int GWL_STYLE = -16; - uint WS_CHILD = 0x40000000; - uint WS_VISIBLE = 0x10000000; - uint WS_DISABLED = 0x08000000; - uint WS_CLIPSIBLINGS = 0x04000000; + if (WindowHandle != IntPtr.Zero) + { + int GWL_STYLE = -16; - Native.SetWindowLong(WindowHandle, GWL_STYLE, - WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS); + uint WS_CHILD = 0x40000000; + uint WS_CLIPSIBLINGS = 0x04000000; + uint WS_DISABLED = 0x08000000; + uint WS_VISIBLE = 0x10000000; + + Native.SetWindowLong(WindowHandle, GWL_STYLE, + WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS); + } } try