From f179a5f0ca1c7fd75a3e02b92b443f4545d774fb Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Sun, 19 May 2024 00:02:59 +0300 Subject: [PATCH] fix: Set focus on video after playback buttons pressed --- Azaion.Annotator/PlayerControlHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Azaion.Annotator/PlayerControlHandler.cs b/Azaion.Annotator/PlayerControlHandler.cs index efbd000..f520125 100644 --- a/Azaion.Annotator/PlayerControlHandler.cs +++ b/Azaion.Annotator/PlayerControlHandler.cs @@ -14,7 +14,7 @@ public class PlayerControlHandler(LibVLC libVLC, MediaPlayer mediaPlayer, MainWi private const int STEP = 20; private const int LARGE_STEP = 5000; - private static readonly string[] CatchSenders = ["ForegroundWindow", "ScrollViewer"]; + private static readonly string[] CatchSenders = ["ForegroundWindow", "ScrollViewer", "VideoView"]; private readonly Dictionary KeysControlEnumDict = new() { @@ -63,6 +63,7 @@ public class PlayerControlHandler(LibVLC libVLC, MediaPlayer mediaPlayer, MainWi public async Task Handle(PlaybackControlEvent notification, CancellationToken cancellationToken) { await ControlPlayback(notification.PlaybackControl); + mainWindow.VideoView.Focus(); } private async Task ControlPlayback(PlaybackControlEnum controlEnum)