Browse Source

* Fix using dead keys on my us_intl keyboard

- Ignore key events when XFilterEvent returns true
  - Do not set key to 0 when it is over 128
tags/v0.99.beta18
Pascal Terjan pterjan 14 years ago
parent
commit
7b4b48187e
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      caca/driver/x11.c

+ 4
- 1
caca/driver/x11.c View File

@@ -598,11 +598,14 @@ static int x11_get_event(caca_display_t *dp, caca_privevent_t *ev)
else else
continue; continue;


if(XFilterEvent(&xevent, None) == True)
continue;

#if defined X_HAVE_UTF8_STRING #if defined X_HAVE_UTF8_STRING
if(Xutf8LookupString(dp->drv.p->ic, &xevent.xkey, ev->data.key.utf8, 8, NULL, NULL)) if(Xutf8LookupString(dp->drv.p->ic, &xevent.xkey, ev->data.key.utf8, 8, NULL, NULL))
{ {
ev->data.key.utf32 = caca_utf8_to_utf32(ev->data.key.utf8, NULL); ev->data.key.utf32 = caca_utf8_to_utf32(ev->data.key.utf8, NULL);
if(ev->data.key.utf32 <= 0x7f)
if(ev->data.key.utf32 <= 0xff)
{ {
ev->data.key.ch = ev->data.key.utf32; ev->data.key.ch = ev->data.key.utf32;
} else { } else {


Loading…
Cancel
Save