/[rdesktop]/jpeg/rdesktop/trunk/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 /jpeg/rdesktop/trunk/xwin.c

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

revision 301 by matthewc, Thu Jan 30 11:28:50 2003 UTC revision 309 by jsorg71, Tue Feb 4 05:32:13 2003 UTC
# Line 31  extern BOOL fullscreen; Line 31  extern BOOL fullscreen;
31  extern BOOL grab_keyboard;  extern BOOL grab_keyboard;
32  extern BOOL hide_decorations;  extern BOOL hide_decorations;
33  extern char title[];  extern char title[];
34    extern int server_bpp;
35  BOOL enable_compose = False;  BOOL enable_compose = False;
36  BOOL focused;  BOOL focused;
37  BOOL mouse_in_wnd;  BOOL mouse_in_wnd;
# Line 88  BOOL owncolmap = False; Line 89  BOOL owncolmap = False;
89  static Colormap xcolmap;  static Colormap xcolmap;
90  static uint32 *colmap;  static uint32 *colmap;
91    
92  #define TRANSLATE(col)          ( owncolmap ? col : translate_colour(colmap[col]) )  #define TRANSLATE(col)          ( server_bpp != 8 ? col : owncolmap ? col : translate_colour(colmap[col]) )
93  #define SET_FOREGROUND(col)     XSetForeground(display, gc, TRANSLATE(col));  #define SET_FOREGROUND(col)     XSetForeground(display, gc, TRANSLATE(col));
94  #define SET_BACKGROUND(col)     XSetBackground(display, gc, TRANSLATE(col));  #define SET_BACKGROUND(col)     XSetBackground(display, gc, TRANSLATE(col));
95    
# Line 749  ui_paint_bitmap(int x, int y, int cx, in Line 750  ui_paint_bitmap(int x, int y, int cx, in
750          XImage *image;          XImage *image;
751          uint8 *tdata;          uint8 *tdata;
752    
753            if (server_bpp == 16)
754            {
755                    image = XCreateImage(display, visual, depth, ZPixmap, 0,
756                                         (char *) data, width, height, 16, 0);
757    
758                    if (ownbackstore)
759                    {
760                            XPutImage(display, backstore, gc, image, 0, 0, x, y, cx, cy);
761                            XCopyArea(display, backstore, wnd, gc, x, y, cx, cy, x, y);
762                    }
763                    else
764                    {
765                            XPutImage(display, wnd, gc, image, 0, 0, x, y, cx, cy);
766                    }
767    
768                    XFree(image);
769                    return;
770            }
771          tdata = (owncolmap ? data : translate_image(width, height, data));          tdata = (owncolmap ? data : translate_image(width, height, data));
772          image = XCreateImage(display, visual, depth, ZPixmap, 0,          image = XCreateImage(display, visual, depth, ZPixmap, 0,
773                               (char *) tdata, width, height, 8, 0);                               (char *) tdata, width, height, 8, 0);

Legend:
Removed from v.301  
changed lines
  Added in v.309

  ViewVC Help
Powered by ViewVC 1.1.26