/[rdesktop]/sourceforge.net/trunk/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by astrand, Sat Jul 27 22:35:38 2002 UTC revision 70 by astrand, Sat Jul 27 23:09:32 2002 UTC
# Line 62  static uint32 *colmap; Line 62  static uint32 *colmap;
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));
# Line 185  translate_colour(uint32 colour) Line 188  translate_colour(uint32 colour)
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)
# Line 248  ui_create_window(char *title) Line 251  ui_create_window(char *title)
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    
# Line 352  ui_create_window(char *title) Line 354  ui_create_window(char *title)
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    
# Line 405  xwin_process_events() Line 408  xwin_process_events()
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;

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26