sys/: Looking at Xorg code i can't figure out if that XKeysymToString function is thread sensible or not. Lock it jus...

Original commit message from CVS:
2007-01-22  Julien MOUTTE  <julien@moutte.net>

* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents):
Looking at Xorg code i can't figure out if that XKeysymToString
function is thread sensible or not. Lock it just in case as
recommended by Radek Doulik <rodo at ximian dot com>.
This commit is contained in:
Julien Moutte 2007-01-22 13:16:42 +00:00
parent 34af6e729d
commit 7861683872
3 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2007-01-22 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents):
Looking at Xorg code i can't figure out if that XKeysymToString
function is thread sensible or not. Lock it just in case as
recommended by Radek Doulik <rodo at ximian dot com>.
2007-01-22 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents):

View file

@ -967,9 +967,11 @@ gst_ximagesink_handle_xevents (GstXImageSink * ximagesink)
e.xkey.keycode, 0);
g_mutex_unlock (ximagesink->x_lock);
if (keysym != NoSymbol) {
g_mutex_lock (ximagesink->x_lock);
gst_navigation_send_key_event (GST_NAVIGATION (ximagesink),
e.type == KeyPress ?
"key-press" : "key-release", XKeysymToString (keysym));
g_mutex_unlock (ximagesink->x_lock);
} else {
gst_navigation_send_key_event (GST_NAVIGATION (ximagesink),
e.type == KeyPress ? "key-press" : "key-release", "unknown");

View file

@ -1092,9 +1092,11 @@ gst_xvimagesink_handle_xevents (GstXvImageSink * xvimagesink)
e.xkey.keycode, 0);
g_mutex_unlock (xvimagesink->x_lock);
if (keysym != NoSymbol) {
g_mutex_lock (xvimagesink->x_lock);
gst_navigation_send_key_event (GST_NAVIGATION (xvimagesink),
e.type == KeyPress ?
"key-press" : "key-release", XKeysymToString (keysym));
g_mutex_unlock (xvimagesink->x_lock);
} else {
gst_navigation_send_key_event (GST_NAVIGATION (xvimagesink),
e.type == KeyPress ? "key-press" : "key-release", "unknown");