62 |
static XIM IM = NULL; |
static XIM IM = NULL; |
63 |
static XIC IC = NULL; |
static XIC IC = NULL; |
64 |
|
|
65 |
|
/* Compose support */ |
66 |
|
BOOL enable_compose = False; |
67 |
|
|
68 |
#define TRANSLATE(col) ( owncolmap ? col : translate_colour(colmap[col]) ) |
#define TRANSLATE(col) ( owncolmap ? col : translate_colour(colmap[col]) ) |
69 |
#define SET_FOREGROUND(col) XSetForeground(display, gc, TRANSLATE(col)); |
#define SET_FOREGROUND(col) XSetForeground(display, gc, TRANSLATE(col)); |
70 |
#define SET_BACKGROUND(col) XSetBackground(display, gc, TRANSLATE(col)); |
#define SET_BACKGROUND(col) XSetBackground(display, gc, TRANSLATE(col)); |
188 |
static unsigned long |
static unsigned long |
189 |
init_inputmethod(void) |
init_inputmethod(void) |
190 |
{ |
{ |
191 |
unsigned long filtered_events; |
unsigned long filtered_events = 0; |
192 |
|
|
193 |
IM = XOpenIM(display, NULL, NULL, NULL); |
IM = XOpenIM(display, NULL, NULL, NULL); |
194 |
if (IM == NULL) |
if (IM == NULL) |
251 |
Screen *screen; |
Screen *screen; |
252 |
uint16 test; |
uint16 test; |
253 |
int i; |
int i; |
|
unsigned long filtered_events; |
|
254 |
|
|
255 |
display = XOpenDisplay(NULL); |
display = XOpenDisplay(NULL); |
256 |
|
|
354 |
if (ownbackstore) |
if (ownbackstore) |
355 |
input_mask |= ExposureMask; |
input_mask |= ExposureMask; |
356 |
|
|
357 |
filtered_events = init_inputmethod(); |
if (enable_compose) |
358 |
|
input_mask |= init_inputmethod(); |
359 |
|
|
360 |
XSelectInput(display, wnd, input_mask | filtered_events); |
XSelectInput(display, wnd, input_mask); |
361 |
|
|
362 |
gc = XCreateGC(display, wnd, 0, NULL); |
gc = XCreateGC(display, wnd, 0, NULL); |
363 |
|
|
408 |
|
|
409 |
while (XCheckMaskEvent(display, ~0, &xevent)) |
while (XCheckMaskEvent(display, ~0, &xevent)) |
410 |
{ |
{ |
411 |
if (XFilterEvent(&xevent, None) == True) |
if (enable_compose && (XFilterEvent(&xevent, None) == True)) |
412 |
{ |
{ |
413 |
DEBUG_KBD("Filtering event\n"); |
DEBUG_KBD("Filtering event\n"); |
414 |
continue; |
continue; |