/[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 679 by jsorg71, Mon Apr 26 23:00:25 2004 UTC revision 695 by stargo, Tue May 11 07:34:03 2004 UTC
# Line 45  static Screen *g_screen; Line 45  static Screen *g_screen;
45  Window g_wnd;  Window g_wnd;
46  extern uint32 g_embed_wnd;  extern uint32 g_embed_wnd;
47  BOOL g_enable_compose = False;  BOOL g_enable_compose = False;
48    BOOL g_Unobscured;              /* used for screenblt */
49  static GC g_gc = NULL;  static GC g_gc = NULL;
50  static Visual *g_visual;  static Visual *g_visual;
51  static int g_depth;  static int g_depth;
# Line 251  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++)];)                  REPEAT(*((uint16*)out) = g_colmap[*(data++)]; out += 2;
256                    )
257          else if (g_xserver_be)          else if (g_xserver_be)
258          {          {
259                  while (out < end)                  while (out < end)
# Line 306  translate8to32(uint8 * data, uint8 * out Line 308  translate8to32(uint8 * data, uint8 * out
308          uint32 value;          uint32 value;
309    
310          if (g_arch_match)          if (g_arch_match)
311                  REPEAT(*(((uint32*)out)++) = g_colmap[*(data++)];)                  REPEAT(*((uint32 *)out) = g_colmap[*(data++)]; out += 4;
312                    )
313          else if (g_xserver_be)          else if (g_xserver_be)
314          {          {
315                  while (out < end)                  while (out < end)
# Line 1005  ui_create_window(void) Line 1008  ui_create_window(void)
1008                  XMaskEvent(g_display, VisibilityChangeMask, &xevent);                  XMaskEvent(g_display, VisibilityChangeMask, &xevent);
1009          }          }
1010          while (xevent.type != VisibilityNotify);          while (xevent.type != VisibilityNotify);
1011            g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured;
1012    
1013          g_focused = False;          g_focused = False;
1014          g_mouse_in_wnd = False;          g_mouse_in_wnd = False;
# Line 1103  xwin_process_events(void) Line 1107  xwin_process_events(void)
1107    
1108                  switch (xevent.type)                  switch (xevent.type)
1109                  {                  {
1110                            case VisibilityNotify:
1111                                    g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured;
1112                                    break;
1113                          case ClientMessage:                          case ClientMessage:
1114                                  /* the window manager told us to quit */                                  /* the window manager told us to quit */
1115                                  if ((xevent.xclient.message_type == g_protocol_atom)                                  if ((xevent.xclient.message_type == g_protocol_atom)
# Line 1799  ui_patblt(uint8 opcode, Line 1806  ui_patblt(uint8 opcode,
1806          {          {
1807                  case 0: /* Solid */                  case 0: /* Solid */
1808                          SET_FOREGROUND(fgcolour);                          SET_FOREGROUND(fgcolour);
1809                          FILL_RECTANGLE(x, y, cx, cy);                          FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
1810                          break;                          break;
1811    
1812                  case 2: /* Hatch */                  case 2: /* Hatch */
# Line 1810  ui_patblt(uint8 opcode, Line 1817  ui_patblt(uint8 opcode,
1817                          XSetFillStyle(g_display, g_gc, FillOpaqueStippled);                          XSetFillStyle(g_display, g_gc, FillOpaqueStippled);
1818                          XSetStipple(g_display, g_gc, fill);                          XSetStipple(g_display, g_gc, fill);
1819                          XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);                          XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);
1820                          FILL_RECTANGLE(x, y, cx, cy);                          FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
1821                          XSetFillStyle(g_display, g_gc, FillSolid);                          XSetFillStyle(g_display, g_gc, FillSolid);
1822                          XSetTSOrigin(g_display, g_gc, 0, 0);                          XSetTSOrigin(g_display, g_gc, 0, 0);
1823                          ui_destroy_glyph((HGLYPH) fill);                          ui_destroy_glyph((HGLYPH) fill);
# Line 1820  ui_patblt(uint8 opcode, Line 1827  ui_patblt(uint8 opcode,
1827                          for (i = 0; i != 8; i++)                          for (i = 0; i != 8; i++)
1828                                  ipattern[7 - i] = brush->pattern[i];                                  ipattern[7 - i] = brush->pattern[i];
1829                          fill = (Pixmap) ui_create_glyph(8, 8, ipattern);                          fill = (Pixmap) ui_create_glyph(8, 8, ipattern);
   
1830                          SET_FOREGROUND(bgcolour);                          SET_FOREGROUND(bgcolour);
1831                          SET_BACKGROUND(fgcolour);                          SET_BACKGROUND(fgcolour);
1832                          XSetFillStyle(g_display, g_gc, FillOpaqueStippled);                          XSetFillStyle(g_display, g_gc, FillOpaqueStippled);
1833                          XSetStipple(g_display, g_gc, fill);                          XSetStipple(g_display, g_gc, fill);
1834                          XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);                          XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);
1835                            FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
                         FILL_RECTANGLE(x, y, cx, cy);  
   
1836                          XSetFillStyle(g_display, g_gc, FillSolid);                          XSetFillStyle(g_display, g_gc, FillSolid);
1837                          XSetTSOrigin(g_display, g_gc, 0, 0);                          XSetTSOrigin(g_display, g_gc, 0, 0);
1838                          ui_destroy_glyph((HGLYPH) fill);                          ui_destroy_glyph((HGLYPH) fill);
# Line 1839  ui_patblt(uint8 opcode, Line 1843  ui_patblt(uint8 opcode,
1843          }          }
1844    
1845          RESET_FUNCTION(opcode);          RESET_FUNCTION(opcode);
1846    
1847            if (g_ownbackstore)
1848                    XCopyArea(g_display, g_backstore, g_wnd, g_gc, x, y, cx, cy, x, y);
1849  }  }
1850    
1851  void  void
# Line 1849  ui_screenblt(uint8 opcode, Line 1856  ui_screenblt(uint8 opcode,
1856          SET_FUNCTION(opcode);          SET_FUNCTION(opcode);
1857          if (g_ownbackstore)          if (g_ownbackstore)
1858          {          {
1859                  XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);                  if (g_Unobscured)
1860                  XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y);                  {
1861                            XCopyArea(g_display, g_wnd, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);
1862                            XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x,
1863                                      y);
1864                    }
1865                    else
1866                    {
1867                            XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y);
1868                            XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x,
1869                                      y);
1870                    }
1871          }          }
1872          else          else
1873          {          {

Legend:
Removed from v.679  
changed lines
  Added in v.695

  ViewVC Help
Powered by ViewVC 1.1.26