/[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 617 by jsorg71, Wed Feb 25 18:28:52 2004 UTC revision 636 by stargo, Sat Mar 13 12:08:18 2004 UTC
# Line 43  Time g_last_gesturetime; Line 43  Time g_last_gesturetime;
43  static int g_x_socket;  static int g_x_socket;
44  static Screen *g_screen;  static Screen *g_screen;
45  Window g_wnd;  Window g_wnd;
46    uint32 g_embed_wnd;
47  BOOL g_enable_compose = False;  BOOL g_enable_compose = False;
48  static GC g_gc = NULL;  static GC g_gc = NULL;
49  static Visual *g_visual;  static Visual *g_visual;
# Line 169  static PixelColour Line 170  static PixelColour
170  split_colour15(uint32 colour)  split_colour15(uint32 colour)
171  {  {
172          PixelColour rv;          PixelColour rv;
173          rv.red =   (colour & 0x7c00) >> 7;          rv.red = (colour & 0x7c00) >> 7;
174          rv.green = (colour & 0x03e0) >> 2;          rv.green = (colour & 0x03e0) >> 2;
175          rv.blue =  (colour & 0x001f) << 3;          rv.blue = (colour & 0x001f) << 3;
176          return rv;          return rv;
177  }  }
178    
# Line 179  static PixelColour Line 180  static PixelColour
180  split_colour16(uint32 colour)  split_colour16(uint32 colour)
181  {  {
182          PixelColour rv;          PixelColour rv;
183          rv.red =   (colour & 0xf800) >> 8;          rv.red = (colour & 0xf800) >> 8;
184          rv.green = (colour & 0x07e0) >> 3;          rv.green = (colour & 0x07e0) >> 3;
185          rv.blue =  (colour & 0x001f) << 3;          rv.blue = (colour & 0x001f) << 3;
186          return rv;          return rv;
187  }  }
188    
# Line 189  static PixelColour Line 190  static PixelColour
190  split_colour24(uint32 colour)  split_colour24(uint32 colour)
191  {  {
192          PixelColour rv;          PixelColour rv;
193          rv.blue =  (colour & 0xff0000) >> 16;          rv.blue = (colour & 0xff0000) >> 16;
194          rv.green = (colour & 0x00ff00) >> 8;          rv.green = (colour & 0x00ff00) >> 8;
195          rv.red =   (colour & 0x0000ff);          rv.red = (colour & 0x0000ff);
196          return rv;          return rv;
197  }  }
198    
# Line 925  ui_create_window(void) Line 926  ui_create_window(void)
926                  XFree(sizehints);                  XFree(sizehints);
927          }          }
928    
929            if ( g_embed_wnd )
930            {
931                    XReparentWindow(g_display, g_wnd, (Window)g_embed_wnd, 0, 0);
932            }
933    
934          input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |          input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
935                  VisibilityChangeMask | FocusChangeMask;                  VisibilityChangeMask | FocusChangeMask;
936    
# Line 1922  ui_draw_text(uint8 font, uint8 flags, in Line 1928  ui_draw_text(uint8 font, uint8 flags, in
1928    
1929          SET_FOREGROUND(bgcolour);          SET_FOREGROUND(bgcolour);
1930    
1931            /* Sometimes, the boxcx value is something really large, like
1932               32691. This makes XCopyArea fail with Xvnc. The code below
1933               is a quick fix. */
1934            if (boxx + boxcx > g_width)
1935                    boxcx = g_width - boxx;
1936    
1937          if (boxcx > 1)          if (boxcx > 1)
1938          {          {
1939                  FILL_RECTANGLE_BACKSTORE(boxx, boxy, boxcx, boxcy);                  FILL_RECTANGLE_BACKSTORE(boxx, boxy, boxcx, boxcy);

Legend:
Removed from v.617  
changed lines
  Added in v.636

  ViewVC Help
Powered by ViewVC 1.1.26