Fix #398 keyboard layout change not working
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
|
- Fix keyboard layout change not working.
|
||||||
|
|
||||||
5.8.0.0 Beta (2022-04-02)
|
5.8.0.0 Beta (2022-04-02)
|
||||||
|
|
||||||
- Fix crash on Windows 7 systems without PowerShell.
|
- Fix crash on Windows 7 systems without PowerShell.
|
||||||
- Fix showing incorrect timestamps in About dialog of Store version.
|
- Fix showing incorrect timestamps in About dialog of Store version.
|
||||||
- Fix Store page showing non existant ARM and x86 support.
|
- Fix Store page showing non-existent ARM and x86 support.
|
||||||
- Fix opening zip files.
|
- Fix opening zip files.
|
||||||
- The list of available input commands is like before shown
|
- The list of available input commands is like before shown
|
||||||
by the text editor, so it's like everything else searchable.
|
by the text editor, so it's like everything else searchable.
|
||||||
@@ -18,7 +20,7 @@
|
|||||||
- Workaround not reproducible logo drawing crash.
|
- Workaround not reproducible logo drawing crash.
|
||||||
- Info command shows the length.
|
- Info command shows the length.
|
||||||
- New mpv.net specific option `show-logo` that allows to disable
|
- New mpv.net specific option `show-logo` that allows to disable
|
||||||
the drawing of the blue mpv.net logo ontop of the native OSC logo.
|
the drawing of the blue mpv.net logo on top of the native OSC logo.
|
||||||
- MediaInfo 22.03
|
- MediaInfo 22.03
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -413,23 +413,8 @@ KP1 script-binding delete_current_file/confirm
|
|||||||
mpv_event evt = (mpv_event)Marshal.PtrToStructure(ptr, typeof(mpv_event));
|
mpv_event evt = (mpv_event)Marshal.PtrToStructure(ptr, typeof(mpv_event));
|
||||||
|
|
||||||
if (WindowHandle == IntPtr.Zero)
|
if (WindowHandle == IntPtr.Zero)
|
||||||
{
|
|
||||||
WindowHandle = Native.FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null);
|
WindowHandle = Native.FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null);
|
||||||
|
|
||||||
if (WindowHandle != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
int GWL_STYLE = -16;
|
|
||||||
|
|
||||||
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
|
try
|
||||||
{
|
{
|
||||||
switch (evt.event_id)
|
switch (evt.event_id)
|
||||||
|
|||||||
@@ -815,6 +815,9 @@ namespace mpvnet
|
|||||||
if (Core.WindowHandle != IntPtr.Zero)
|
if (Core.WindowHandle != IntPtr.Zero)
|
||||||
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
||||||
break;
|
break;
|
||||||
|
case 0x051: // WM_INPUTLANGCHANGE
|
||||||
|
ActivateKeyboardLayout(m.LParam, 0x00000100u /*KLF_SETFORPROCESS*/);
|
||||||
|
break;
|
||||||
case 0x319: // WM_APPCOMMAND
|
case 0x319: // WM_APPCOMMAND
|
||||||
{
|
{
|
||||||
string value = Input.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
|
string value = Input.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ namespace mpvnet
|
|||||||
[DllImport("kernel32.dll")]
|
[DllImport("kernel32.dll")]
|
||||||
public static extern IntPtr LoadLibrary(string path);
|
public static extern IntPtr LoadLibrary(string path);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern uint ActivateKeyboardLayout(IntPtr hkl, uint flags);
|
||||||
|
|
||||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||||
public static extern IntPtr FindWindowEx(
|
public static extern IntPtr FindWindowEx(
|
||||||
IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
|
||||||
|
|||||||
Reference in New Issue
Block a user