summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-09-24 12:45:44 +0000
committerphintuka <phintuka>2010-09-24 12:45:44 +0000
commit289b33b2de6b59b6fe92192a55297cbbdfd70d6b (patch)
tree6183685d06ea24fa0c5ff2caff64cb239cb71f8d
parentf10d58079be1d47ae466c07a8ae36f30ad4b53c7 (diff)
downloadxineliboutput-289b33b2de6b59b6fe92192a55297cbbdfd70d6b.tar.gz
xineliboutput-289b33b2de6b59b6fe92192a55297cbbdfd70d6b.tar.bz2
Minor optimization to Alt/Ctrl key handling
-rw-r--r--xine_sxfe_frontend.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 08951fe3..767dc873 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.140 2010-09-24 12:34:29 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.141 2010-09-24 12:45:44 phintuka Exp $
*
*/
@@ -1589,6 +1589,7 @@ static void XKeyEvent_handler(sxfe_t *this, XKeyEvent *kev)
this->x.fe.send_event((frontend_t*)this, fe_event);
else if (!this->no_x_kbd) {
if (ks_name) {
+ if (kev->state & (Mod1Mask|ControlMask)) {
char keyname[40] = "";
if (kev->state & Mod1Mask) {
strcat(keyname, "Alt+");
@@ -1597,7 +1598,9 @@ static void XKeyEvent_handler(sxfe_t *this, XKeyEvent *kev)
strcat(keyname, "Ctrl+");
}
strncat(keyname, ks_name, sizeof(keyname) - 11);
- this->x.fe.send_input_event((frontend_t*)this, "XKeySym", keyname, 0, 0);
+ ks_name = keyname;
+ }
+ this->x.fe.send_input_event((frontend_t*)this, "XKeySym", ks_name, 0, 0);
}
}
}