/[rdesktop]/sourceforge.net/branches/seamlessrdp-branch/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/branches/seamlessrdp-branch/rdesktop/xwin.c

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

revision 435 by astrand, Wed Jul 9 09:18:20 2003 UTC revision 438 by jsorg71, Fri Aug 1 17:01:58 2003 UTC
# Line 32  extern BOOL fullscreen; Line 32  extern BOOL fullscreen;
32  extern BOOL grab_keyboard;  extern BOOL grab_keyboard;
33  extern BOOL hide_decorations;  extern BOOL hide_decorations;
34  extern char title[];  extern char title[];
35  extern int server_bpp;  extern int g_server_bpp;
36  extern int win_button_size;  extern int win_button_size;
37  BOOL enable_compose = False;  BOOL enable_compose = False;
38  BOOL focused;  BOOL focused;
# Line 105  BOOL owncolmap = False; Line 105  BOOL owncolmap = False;
105  static Colormap xcolmap;  static Colormap xcolmap;
106  static uint32 *colmap;  static uint32 *colmap;
107    
108  #define TRANSLATE(col)          ( 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));
110  #define SET_BACKGROUND(col)     XSetBackground(display, gc, TRANSLATE(col));  #define SET_BACKGROUND(col)     XSetBackground(display, gc, TRANSLATE(col));
111    
# Line 218  make_colour32(PixelColour pc) Line 218  make_colour32(PixelColour pc)
218  static uint32  static uint32
219  translate_colour(uint32 colour)  translate_colour(uint32 colour)
220  {  {
221          switch (server_bpp)          switch (g_server_bpp)
222          {          {
223                  case 15:                  case 15:
224                          switch (bpp)                          switch (bpp)
# Line 419  translate_image(int width, int height, u Line 419  translate_image(int width, int height, u
419          uint8 *out = (uint8 *) xmalloc(size);          uint8 *out = (uint8 *) xmalloc(size);
420          uint8 *end = out + size;          uint8 *end = out + size;
421    
422          switch (server_bpp)          switch (g_server_bpp)
423          {          {
424                  case 24:                  case 24:
425                          switch (bpp)                          switch (bpp)
# Line 616  ui_init(void) Line 616  ui_init(void)
616          xclip_init();          xclip_init();
617    
618          /* todo take this out when high colour is done */          /* todo take this out when high colour is done */
619          printf("server bpp %d client bpp %d depth %d\n", server_bpp, bpp, depth);          printf("server bpp %d client bpp %d depth %d\n", g_server_bpp, bpp, depth);
620    
621          return True;          return True;
622  }  }
# Line 1069  ui_create_bitmap(int width, int height, Line 1069  ui_create_bitmap(int width, int height,
1069          tdata = (owncolmap ? data : translate_image(width, height, data));          tdata = (owncolmap ? data : translate_image(width, height, data));
1070          bitmap = XCreatePixmap(display, wnd, width, height, depth);          bitmap = XCreatePixmap(display, wnd, width, height, depth);
1071          image = XCreateImage(display, visual, depth, ZPixmap, 0,          image = XCreateImage(display, visual, depth, ZPixmap, 0,
1072                               (char *) tdata, width, height, server_bpp == 8 ? 8 : bpp, 0);                               (char *) tdata, width, height, g_server_bpp == 8 ? 8 : bpp, 0);
1073    
1074          XPutImage(display, bitmap, gc, image, 0, 0, 0, 0, width, height);          XPutImage(display, bitmap, gc, image, 0, 0, 0, 0, width, height);
1075    
# Line 1086  ui_paint_bitmap(int x, int y, int cx, in Line 1086  ui_paint_bitmap(int x, int y, int cx, in
1086          uint8 *tdata;          uint8 *tdata;
1087          tdata = (owncolmap ? data : translate_image(width, height, data));          tdata = (owncolmap ? data : translate_image(width, height, data));
1088          image = XCreateImage(display, visual, depth, ZPixmap, 0,          image = XCreateImage(display, visual, depth, ZPixmap, 0,
1089                               (char *) tdata, width, height, server_bpp == 8 ? 8 : bpp, 0);                               (char *) tdata, width, height, g_server_bpp == 8 ? 8 : bpp, 0);
1090    
1091          if (ownbackstore)          if (ownbackstore)
1092          {          {

Legend:
Removed from v.435  
changed lines
  Added in v.438

  ViewVC Help
Powered by ViewVC 1.1.26