From 7c92ed0bd077ac9bcb7ba8ac2660dc065948512b Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 17 Dec 2022 20:04:01 +0900 Subject: [PATCH] d3d11videosink: Fixing focus lost on desktop layout change Watch all message on the window thread, instead of internal window only. Otherwise, some global window messages, such as desktop layout change, wouldn't be handled by our window. Part-of: --- .../gst-plugins-bad/sys/d3d11/gstd3d11window_win32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window_win32.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window_win32.cpp index 7b225d0e6e..eaff4a95a4 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window_win32.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11window_win32.cpp @@ -438,8 +438,8 @@ gst_d3d11_window_win32_thread_func (gpointer data) window->initialized = gst_d3d11_window_win32_create_internal_window (self); - self->msg_io_channel = - g_io_channel_win32_new_messages ((guintptr) self->internal_hwnd); + /* Watching and dispatching all messages on this thread */ + self->msg_io_channel = g_io_channel_win32_new_messages (0); self->msg_source = g_io_create_watch (self->msg_io_channel, G_IO_IN); g_source_set_callback (self->msg_source, (GSourceFunc) msg_cb, self, NULL); g_source_attach (self->msg_source, self->main_context);