/[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 713 by jsorg71, Wed Jun 16 03:08:55 2004 UTC revision 788 by astrand, Thu Oct 21 08:43:22 2004 UTC
# Line 47  extern uint32 g_embed_wnd; Line 47  extern uint32 g_embed_wnd;
47  BOOL g_enable_compose = False;  BOOL g_enable_compose = False;
48  BOOL g_Unobscured;              /* used for screenblt */  BOOL g_Unobscured;              /* used for screenblt */
49  static GC g_gc = NULL;  static GC g_gc = NULL;
50    static GC g_create_bitmap_gc = NULL;
51    static GC g_create_glyph_gc = NULL;
52  static Visual *g_visual;  static Visual *g_visual;
53  static int g_depth;  static int g_depth;
54  static int g_bpp;  static int g_bpp;
# Line 944  BOOL Line 946  BOOL
946  ui_create_window(void)  ui_create_window(void)
947  {  {
948          uint8 null_pointer_mask[1] = { 0x80 };          uint8 null_pointer_mask[1] = { 0x80 };
949          uint8 null_pointer_data[4] = { 0x00, 0x00, 0x00, 0x00 };          uint8 null_pointer_data[24] = { 0x00 };
950    
951          XSetWindowAttributes attribs;          XSetWindowAttributes attribs;
952          XClassHint *classhints;          XClassHint *classhints;
953          XSizeHints *sizehints;          XSizeHints *sizehints;
# Line 969  ui_create_window(void) Line 972  ui_create_window(void)
972          if (g_gc == NULL)          if (g_gc == NULL)
973                  g_gc = XCreateGC(g_display, g_wnd, 0, NULL);                  g_gc = XCreateGC(g_display, g_wnd, 0, NULL);
974    
975            if (g_create_bitmap_gc == NULL)
976                    g_create_bitmap_gc = XCreateGC(g_display, g_wnd, 0, NULL);
977    
978          if ((g_ownbackstore) && (g_backstore == 0))          if ((g_ownbackstore) && (g_backstore == 0))
979          {          {
980                  g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth);                  g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth);
# Line 1481  ui_create_bitmap(int width, int height, Line 1487  ui_create_bitmap(int width, int height,
1487          image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,          image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
1488                               (char *) tdata, width, height, bitmap_pad, 0);                               (char *) tdata, width, height, bitmap_pad, 0);
1489    
1490          XPutImage(g_display, bitmap, g_gc, image, 0, 0, 0, 0, width, height);          XPutImage(g_display, bitmap, g_create_bitmap_gc, image, 0, 0, 0, 0, width, height);
1491    
1492          XFree(image);          XFree(image);
1493          if (tdata != data)          if (tdata != data)
# Line 1539  ui_create_glyph(int width, int height, u Line 1545  ui_create_glyph(int width, int height, u
1545          XImage *image;          XImage *image;
1546          Pixmap bitmap;          Pixmap bitmap;
1547          int scanline;          int scanline;
         GC gc;  
1548    
1549          scanline = (width + 7) / 8;          scanline = (width + 7) / 8;
1550    
1551          bitmap = XCreatePixmap(g_display, g_wnd, width, height, 1);          bitmap = XCreatePixmap(g_display, g_wnd, width, height, 1);
1552          gc = XCreateGC(g_display, bitmap, 0, NULL);          if (g_create_glyph_gc == 0)
1553                    g_create_glyph_gc = XCreateGC(g_display, bitmap, 0, NULL);
1554    
1555          image = XCreateImage(g_display, g_visual, 1, ZPixmap, 0, (char *) data,          image = XCreateImage(g_display, g_visual, 1, ZPixmap, 0, (char *) data,
1556                               width, height, 8, scanline);                               width, height, 8, scanline);
# Line 1552  ui_create_glyph(int width, int height, u Line 1558  ui_create_glyph(int width, int height, u
1558          image->bitmap_bit_order = MSBFirst;          image->bitmap_bit_order = MSBFirst;
1559          XInitImage(image);          XInitImage(image);
1560    
1561          XPutImage(g_display, bitmap, gc, image, 0, 0, 0, 0, width, height);          XPutImage(g_display, bitmap, g_create_glyph_gc, image, 0, 0, 0, 0, width, height);
1562    
1563          XFree(image);          XFree(image);
         XFreeGC(g_display, gc);  
1564          return (HGLYPH) bitmap;          return (HGLYPH) bitmap;
1565  }  }
1566    

Legend:
Removed from v.713  
changed lines
  Added in v.788

  ViewVC Help
Powered by ViewVC 1.1.26