+2004-06-27 Julien Moutte <julien@moutte.net>
+
+ * sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate),
+ (gst_ximagesink_xwindow_new):
+ * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_decorate),
+ (gst_xvimagesink_xwindow_new): I prefer locking the mutex in the
+ function directly. We might want to call it from somewhere else one day.
+
2004-06-27 Julien Moutte <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate),
g_return_val_if_fail (GST_IS_XIMAGESINK (ximagesink), FALSE);
g_return_val_if_fail (window != NULL, FALSE);
+ g_mutex_lock (ximagesink->x_lock);
+
hints_atom = XInternAtom (ximagesink->xcontext->disp, "_MOTIF_WM_HINTS", 1);
hints = g_malloc0 (sizeof (MotifWmHints));
XSync (ximagesink->xcontext->disp, FALSE);
+ g_mutex_unlock (ximagesink->x_lock);
+
g_free (hints);
return TRUE;
XMapRaised (ximagesink->xcontext->disp, xwindow->win);
- gst_ximagesink_xwindow_decorate (ximagesink, xwindow);
-
XSync (ximagesink->xcontext->disp, FALSE);
g_mutex_unlock (ximagesink->x_lock);
+ gst_ximagesink_xwindow_decorate (ximagesink, xwindow);
+
gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ximagesink), xwindow->win);
return xwindow;
g_return_val_if_fail (GST_IS_XVIMAGESINK (xvimagesink), FALSE);
g_return_val_if_fail (window != NULL, FALSE);
+ g_mutex_lock (xvimagesink->x_lock);
+
hints_atom = XInternAtom (xvimagesink->xcontext->disp, "_MOTIF_WM_HINTS", 1);
hints = g_malloc0 (sizeof (MotifWmHints));
XSync (xvimagesink->xcontext->disp, FALSE);
+ g_mutex_unlock (xvimagesink->x_lock);
+
g_free (hints);
return TRUE;
XMapRaised (xvimagesink->xcontext->disp, xwindow->win);
- gst_xvimagesink_xwindow_decorate (xvimagesink, xwindow);
-
XSync (xvimagesink->xcontext->disp, FALSE);
g_mutex_unlock (xvimagesink->x_lock);
+ gst_xvimagesink_xwindow_decorate (xvimagesink, xwindow);
+
gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (xvimagesink), xwindow->win);
return xwindow;