Add support for enabling/disabling local compose handling. Compose support is now disabled per default
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@69 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
df8c2e47ce
commit
5c181a1e5f
@ -42,6 +42,16 @@ X 2d shift
|
||||
If flags include "localstate", the modifier to send will be determined
|
||||
by the local modifier state.
|
||||
|
||||
|
||||
4) enable_compose
|
||||
|
||||
If any line starts with the keyword "enable_compose", rdesktop will
|
||||
enable local Compose/Multi_key handling. Enabling this will often make
|
||||
it impossible to compose characters with dead keys (on the remote
|
||||
side). This is because when local compose support is enabled, dead
|
||||
keys will not be sent to the remote side.
|
||||
|
||||
|
||||
Suggested X11 keysym mapping on PCs
|
||||
===================================
|
||||
Unfortunately, there is no standard for which keysyms a given key
|
||||
|
@ -35,6 +35,7 @@
|
||||
extern Display *display;
|
||||
extern char keymapname[16];
|
||||
extern int keylayout;
|
||||
extern BOOL enable_compose;
|
||||
|
||||
static key_translation keymap[KEYMAP_SIZE];
|
||||
static unsigned int min_keycode;
|
||||
@ -120,6 +121,14 @@ xkeymap_read(char *mapname)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* compose */
|
||||
if (strncmp(line, "enable_compose", 15) == 0)
|
||||
{
|
||||
DEBUG_KBD("Enabling compose handling\n");
|
||||
enable_compose = True;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
if (line[0] == '#')
|
||||
{
|
||||
|
13
xwin.c
13
xwin.c
@ -62,6 +62,9 @@ static uint32 *colmap;
|
||||
static XIM IM = NULL;
|
||||
static XIC IC = NULL;
|
||||
|
||||
/* Compose support */
|
||||
BOOL enable_compose = False;
|
||||
|
||||
#define TRANSLATE(col) ( owncolmap ? col : translate_colour(colmap[col]) )
|
||||
#define SET_FOREGROUND(col) XSetForeground(display, gc, TRANSLATE(col));
|
||||
#define SET_BACKGROUND(col) XSetBackground(display, gc, TRANSLATE(col));
|
||||
@ -185,7 +188,7 @@ translate_colour(uint32 colour)
|
||||
static unsigned long
|
||||
init_inputmethod(void)
|
||||
{
|
||||
unsigned long filtered_events;
|
||||
unsigned long filtered_events = 0;
|
||||
|
||||
IM = XOpenIM(display, NULL, NULL, NULL);
|
||||
if (IM == NULL)
|
||||
@ -248,7 +251,6 @@ ui_create_window(char *title)
|
||||
Screen *screen;
|
||||
uint16 test;
|
||||
int i;
|
||||
unsigned long filtered_events;
|
||||
|
||||
display = XOpenDisplay(NULL);
|
||||
|
||||
@ -352,9 +354,10 @@ ui_create_window(char *title)
|
||||
if (ownbackstore)
|
||||
input_mask |= ExposureMask;
|
||||
|
||||
filtered_events = init_inputmethod();
|
||||
if (enable_compose)
|
||||
input_mask |= init_inputmethod();
|
||||
|
||||
XSelectInput(display, wnd, input_mask | filtered_events);
|
||||
XSelectInput(display, wnd, input_mask);
|
||||
|
||||
gc = XCreateGC(display, wnd, 0, NULL);
|
||||
|
||||
@ -405,7 +408,7 @@ xwin_process_events()
|
||||
|
||||
while (XCheckMaskEvent(display, ~0, &xevent))
|
||||
{
|
||||
if (XFilterEvent(&xevent, None) == True)
|
||||
if (enable_compose && (XFilterEvent(&xevent, None) == True))
|
||||
{
|
||||
DEBUG_KBD("Filtering event\n");
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user