/[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 697 by astrand, Tue May 11 13:45:57 2004 UTC revision 708 by jsorg71, Fri Jun 4 15:01:36 2004 UTC
# Line 172  static PixelColour Line 172  static PixelColour
172  split_colour15(uint32 colour)  split_colour15(uint32 colour)
173  {  {
174          PixelColour rv;          PixelColour rv;
175          rv.red = (colour & 0x7c00) >> 7;          rv.red = ((colour >> 7) & 0xf8) | ((colour >> 12) & 0x7);
176          rv.green = (colour & 0x03e0) >> 2;          rv.green = ((colour >> 2) & 0xf8) | ((colour >> 8) & 0x7);
177          rv.blue = (colour & 0x001f) << 3;          rv.blue = ((colour << 3) & 0xf8) | ((colour >> 2) & 0x7);
178          return rv;          return rv;
179  }  }
180    
# Line 182  static PixelColour Line 182  static PixelColour
182  split_colour16(uint32 colour)  split_colour16(uint32 colour)
183  {  {
184          PixelColour rv;          PixelColour rv;
185          rv.red = (colour & 0xf800) >> 8;          rv.red = ((colour >> 8) & 0xf8) | ((colour >> 13) & 0x7);
186          rv.green = (colour & 0x07e0) >> 3;          rv.green = ((colour >> 3) & 0xfc) | ((colour >> 9) & 0x3);
187          rv.blue = (colour & 0x001f) << 3;          rv.blue = ((colour << 3) & 0xf8) | ((colour >> 2) & 0x7);
188          return rv;          return rv;
189  }  }
190    
# Line 252  translate8to16(uint8 * data, uint8 * out Line 252  translate8to16(uint8 * data, uint8 * out
252          uint16 value;          uint16 value;
253    
254          if (g_arch_match)          if (g_arch_match)
255                  REPEAT(*((uint16 *) out) = g_colmap[*(data++)]; out += 2;                  REPEAT(*((uint16 *) out) = g_colmap[*(data++)];
256                  )                         out += 2;)
257          else          else
258  if (g_xserver_be)  if (g_xserver_be)
259  {  {
# Line 309  translate8to32(uint8 * data, uint8 * out Line 309  translate8to32(uint8 * data, uint8 * out
309          uint32 value;          uint32 value;
310    
311          if (g_arch_match)          if (g_arch_match)
312                  REPEAT(*((uint32 *) out) = g_colmap[*(data++)]; out += 4;                  REPEAT(*((uint32 *) out) = g_colmap[*(data++)];
313                  )                         out += 4;)
314          else          else
315  if (g_xserver_be)  if (g_xserver_be)
316  {  {
# Line 1031  void Line 1031  void
1031  ui_resize_window()  ui_resize_window()
1032  {  {
1033          XSizeHints *sizehints;          XSizeHints *sizehints;
1034            Pixmap bs;
1035    
1036          sizehints = XAllocSizeHints();          sizehints = XAllocSizeHints();
1037          if (sizehints)          if (sizehints)
# Line 1046  ui_resize_window() Line 1047  ui_resize_window()
1047          {          {
1048                  XResizeWindow(g_display, g_wnd, g_width, g_height);                  XResizeWindow(g_display, g_wnd, g_width, g_height);
1049          }          }
1050    
1051            /* create new backstore pixmap */
1052            if (g_backstore != 0)
1053            {
1054                    bs = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth);
1055                    XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen));
1056                    XFillRectangle(g_display, bs, g_gc, 0, 0, g_width, g_height);
1057                    XCopyArea(g_display, g_backstore, bs, g_gc, 0, 0, g_width, g_height, 0, 0);
1058                    XFreePixmap(g_display, g_backstore);
1059                    g_backstore = bs;
1060            }
1061  }  }
1062    
1063  void  void

Legend:
Removed from v.697  
changed lines
  Added in v.708

  ViewVC Help
Powered by ViewVC 1.1.26