[vlc-commits] vout:win32: make sure we don't accidentally activate the HWND
Steve Lhomme
git at videolan.org
Sat Apr 6 16:40:30 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat Apr 6 16:34:49 2019 +0200| [1d855db1192554ba7d914ea982984ada5eba6ada] | committer: Steve Lhomme
vout:win32: make sure we don't accidentally activate the HWND
We don't want to activate our HWNDs when we move/show them.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d855db1192554ba7d914ea982984ada5eba6ada
---
modules/video_output/win32/common.c | 4 ++--
modules/video_output/win32/events.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 37038ac88f..f75a1310c6 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -179,7 +179,7 @@ void UpdateRects(vout_display_t *vd, display_win32_area_t *area, vout_display_sy
{
if (sys->hvideownd)
{
- UINT swpFlags = SWP_NOCOPYBITS | SWP_NOZORDER | SWP_ASYNCWINDOWPOS;
+ UINT swpFlags = SWP_NOCOPYBITS | SWP_NOZORDER | SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE;
if (sys->is_first_placement)
{
swpFlags |= SWP_SHOWWINDOW;
@@ -273,7 +273,7 @@ int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_s
{
SetWindowPos(sys->hwnd, 0, 0, 0,
area->vdcfg.display.width,
- area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE);
+ area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
}
#endif /* !VLC_WINSTORE_APP */
UpdateRects(vd, area, sys);
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 41f0bded57..e44086ae39 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -368,7 +368,7 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
/* Create the window */
p_event->hwnd =
- CreateWindowEx( WS_EX_NOPARENTNOTIFY,
+ CreateWindowEx( WS_EX_NOPARENTNOTIFY | WS_EX_NOACTIVATE,
p_event->class_main, /* name of window class */
TEXT(VOUT_TITLE) TEXT(" (VLC Video Output)"),/* window title */
i_style, /* window style */
@@ -401,7 +401,7 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
InitGestures( p_event->hwnd, &p_event->p_gesture, p_event->is_projected );
/* Now display the window */
- ShowWindow( p_event->hwnd, SW_SHOW );
+ ShowWindow( p_event->hwnd, SW_SHOWNOACTIVATE );
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list