summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-09-24 12:34:29 +0000
committerphintuka <phintuka>2010-09-24 12:34:29 +0000
commitf10d58079be1d47ae466c07a8ae36f30ad4b53c7 (patch)
tree924c1a38a827f428f8df95704de6adec9e350275
parente2aa4b0741d8089a1d79b4350232773069281926 (diff)
downloadxineliboutput-f10d58079be1d47ae466c07a8ae36f30ad4b53c7.tar.gz
xineliboutput-f10d58079be1d47ae466c07a8ae36f30ad4b53c7.tar.bz2
Moved XKeysymToString() call to locked section (XLockDisplay()...XUnlockDisplay())
-rw-r--r--xine_sxfe_frontend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 245cf138..08951fe3 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.139 2010-09-24 12:31:37 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.140 2010-09-24 12:34:29 phintuka Exp $
*
*/
@@ -1556,9 +1556,11 @@ static void XKeyEvent_handler(sxfe_t *this, XKeyEvent *kev)
char buffer[20];
XComposeStatus status;
const char *fe_event = NULL;
+ const char *ks_name;
XLockDisplay (this->display);
XLookupString(kev, buffer, sizeof(buffer), &ks, &status);
+ ks_name = XKeysymToString(ks);
XUnlockDisplay (this->display);
switch(ks) {
@@ -1586,7 +1588,6 @@ static void XKeyEvent_handler(sxfe_t *this, XKeyEvent *kev)
if (fe_event)
this->x.fe.send_event((frontend_t*)this, fe_event);
else if (!this->no_x_kbd) {
- const char *ks_name = XKeysymToString(ks);
if (ks_name) {
char keyname[40] = "";
if (kev->state & Mod1Mask) {