mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
dshowvideosink: close our own window when changing the window id
If we created the window, it needs to be closed after setting a new window id. https://bugzilla.gnome.org/show_bug.cgi?id=574290
This commit is contained in:
parent
7ab007bafe
commit
c2c32fe773
1 changed files with 10 additions and 3 deletions
|
@ -123,9 +123,16 @@ gst_dshowvideosink_set_window_id (GstXOverlay * overlay, ULONG window_id)
|
|||
if (sink->connected && sink->filter_media_event) {
|
||||
HRESULT hres;
|
||||
|
||||
/* Return control of application window */
|
||||
SetWindowLongPtr (previous_window, GWL_WNDPROC, (LONG)sink->prevWndProc);
|
||||
SetWindowPos (previous_window, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
if (sink->is_new_window) {
|
||||
/* If we created a new window */
|
||||
SendMessage (previous_window, WM_CLOSE, NULL, NULL);
|
||||
sink->is_new_window = FALSE;
|
||||
sink->window_closed = FALSE;
|
||||
} else {
|
||||
/* Return control of application window */
|
||||
SetWindowLongPtr (previous_window, GWL_WNDPROC, (LONG)sink->prevWndProc);
|
||||
SetWindowPos (previous_window, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
}
|
||||
|
||||
gst_dshowvideosink_set_window_for_renderer (sink);
|
||||
|
||||
|
|
Loading…
Reference in a new issue