/[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 447 by jsorg71, Thu Aug 21 23:23:15 2003 UTC revision 448 by astrand, Wed Aug 27 08:21:53 2003 UTC
# Line 103  PixelColour; Line 103  PixelColour;
103  /* colour maps */  /* colour maps */
104  BOOL owncolmap = False;  BOOL owncolmap = False;
105  static Colormap xcolmap;  static Colormap xcolmap;
106  static uint32 *colmap;  static uint32 *colmap = NULL;
107    
108  #define TRANSLATE(col)          ( g_server_bpp != 8 ? translate_colour(col) : owncolmap ? col : translate_colour(colmap[col]) )  #define TRANSLATE(col)          ( g_server_bpp != 8 ? translate_colour(col) : owncolmap ? col : translate_colour(colmap[col]) )
109  #define SET_FOREGROUND(col)     XSetForeground(display, gc, TRANSLATE(col));  #define SET_FOREGROUND(col)     XSetForeground(display, gc, TRANSLATE(col));
# Line 600  ui_init(void) Line 600  ui_init(void)
600          if (ownbackstore)          if (ownbackstore)
601          {          {
602                  backstore =                  backstore =
603                          XCreatePixmap(display, RootWindowOfScreen(screen), g_width, g_height, depth);                          XCreatePixmap(display, RootWindowOfScreen(screen), g_width, g_height,
604                                          depth);
605    
606                  /* clear to prevent rubbish being exposed at startup */                  /* clear to prevent rubbish being exposed at startup */
607                  XSetForeground(display, gc, BlackPixelOfScreen(screen));                  XSetForeground(display, gc, BlackPixelOfScreen(screen));
# Line 1347  void Line 1348  void
1348  ui_set_colourmap(HCOLOURMAP map)  ui_set_colourmap(HCOLOURMAP map)
1349  {  {
1350          if (!owncolmap)          if (!owncolmap)
1351            {
1352                    if (colmap)
1353                            xfree(colmap);
1354    
1355                  colmap = (uint32 *) map;                  colmap = (uint32 *) map;
1356            }
1357          else          else
1358                  XSetWindowColormap(display, wnd, (Colormap) map);                  XSetWindowColormap(display, wnd, (Colormap) map);
1359  }  }

Legend:
Removed from v.447  
changed lines
  Added in v.448

  ViewVC Help
Powered by ViewVC 1.1.26