summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/win32/gstglwindow_win32.c
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2016-05-16 15:26:53 -0400
committerMatthew Waters <matthew@centricular.com>2016-05-20 17:04:01 +0200
commit83bb89f4eccdfe9019251e4b70b42b95b4fe08fa (patch)
tree6bbb8beb2be9ed967941395fe3d36479faf19406 /gst-libs/gst/gl/win32/gstglwindow_win32.c
parente357e372e17fa5870be8e58a4bd52b512317c693 (diff)
downloadgstreamer-plugins-bad-83bb89f4eccdfe9019251e4b70b42b95b4fe08fa.tar.gz
gl: win32: Don't steal parent focus when creating internal window
This fix regression introduced by 0acc18c60f6f962cc6553f6047fdb64891bab544. https://bugzilla.gnome.org/show_bug.cgi?id=766520
Diffstat (limited to 'gst-libs/gst/gl/win32/gstglwindow_win32.c')
-rw-r--r--gst-libs/gst/gl/win32/gstglwindow_win32.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c
index 1ff18bbad..fca265718 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.c
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c
@@ -285,7 +285,12 @@ gst_gl_window_win32_create_window (GstGLWindowWin32 * window_win32,
GST_LOG ("Created a win32 window");
- set_parent_win_id (window_win32);
+ /* The window has been created as if it had no parent, so there is nothing
+ * else to do in that case. Even if user has already set a window,
+ * parent_win_id could still be 0 at this point, and in that case calling
+ * set_parent_win_id() here would steal focus from the parent window. */
+ if (window_win32->parent_win_id)
+ set_parent_win_id (window_win32);
return TRUE;