d3d12videosink: Handle external HWND's mouse/keyboard events

OS will not propagate the event to child HWND if it's handled by
the parent. Thus, navigation event should be handled by parent HWND's
event handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6692>
This commit is contained in:
Seungha Yang 2024-04-19 21:17:17 +09:00
parent a032c1e1bd
commit 6659bd6362

View file

@ -872,6 +872,21 @@ sub_class_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
priv->hwnd_cond.notify_all (); priv->hwnd_cond.notify_all ();
break; break;
} }
case WM_KEYDOWN:
case WM_KEYUP:
if (priv->enable_navigation)
gst_d3d12_window_on_key_event (self, msg, wparam, lparam);
break;
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_RBUTTONDOWN:
case WM_RBUTTONUP:
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_MOUSEMOVE:
if (priv->enable_navigation)
gst_d3d12_window_on_mouse_event (self, msg, wparam, lparam);
break;
default: default:
break; break;
} }