/[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 988 by astrand, Thu Aug 25 20:27:45 2005 UTC revision 1029 by astrand, Fri Nov 18 22:46:38 2005 UTC
# Line 79  static Pixmap g_backstore = 0; Line 79  static Pixmap g_backstore = 0;
79  static BOOL g_moving_wnd;  static BOOL g_moving_wnd;
80  static int g_move_x_offset = 0;  static int g_move_x_offset = 0;
81  static int g_move_y_offset = 0;  static int g_move_y_offset = 0;
82    static BOOL g_using_full_workarea = False;
83    
84  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
85  extern int g_dsp_fd;  extern int g_dsp_fd;
# Line 137  PixelColour; Line 138  PixelColour;
138                                  XDrawArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \                                  XDrawArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \
139                          break; \                          break; \
140                  case 1: /* Filled */ \                  case 1: /* Filled */ \
141                          XFillArc(g_display, g_ownbackstore ? g_backstore : g_wnd, g_gc, x, y, \                          XFillArc(g_display, g_wnd, g_gc, x, y, cx, cy, 0, 360*64); \
                                  cx, cy, 0, 360*64); \  
142                          if (g_ownbackstore) \                          if (g_ownbackstore) \
143                                  XCopyArea(g_display, g_backstore, g_wnd, g_gc, x, y, cx, cy, x, y); \                                  XFillArc(g_display, g_backstore, g_gc, x, y, cx, cy, 0, 360*64); \
144                          break; \                          break; \
145          } \          } \
146  }  }
# Line 1091  ui_init(void) Line 1091  ui_init(void)
1091          else if (g_width < 0)          else if (g_width < 0)
1092          {          {
1093                  /* Percent of screen */                  /* Percent of screen */
1094                    if (-g_width >= 100)
1095                            g_using_full_workarea = True;
1096                  g_height = HeightOfScreen(g_screen) * (-g_width) / 100;                  g_height = HeightOfScreen(g_screen) * (-g_width) / 100;
1097                  g_width = WidthOfScreen(g_screen) * (-g_width) / 100;                  g_width = WidthOfScreen(g_screen) * (-g_width) / 100;
1098          }          }
# Line 1098  ui_init(void) Line 1100  ui_init(void)
1100          {          {
1101                  /* Fetch geometry from _NET_WORKAREA */                  /* Fetch geometry from _NET_WORKAREA */
1102                  uint32 x, y, cx, cy;                  uint32 x, y, cx, cy;
1103                    g_using_full_workarea = True;
1104    
1105                  if (get_current_workarea(&x, &y, &cx, &cy) == 0)                  if (get_current_workarea(&x, &y, &cx, &cy) == 0)
1106                  {                  {
# Line 1398  handle_button_event(XEvent xevent, BOOL Line 1401  handle_button_event(XEvent xevent, BOOL
1401                          /* The title bar. */                          /* The title bar. */
1402                          if (xevent.type == ButtonPress)                          if (xevent.type == ButtonPress)
1403                          {                          {
1404                                  if (!g_fullscreen && g_hide_decorations)                                  if (!g_fullscreen && g_hide_decorations && !g_using_full_workarea)
1405                                  {                                  {
1406                                          g_moving_wnd = True;                                          g_moving_wnd = True;
1407                                          g_move_x_offset = xevent.xbutton.x;                                          g_move_x_offset = xevent.xbutton.x;
# Line 2442  ui_draw_text(uint8 font, uint8 flags, ui Line 2445  ui_draw_text(uint8 font, uint8 flags, ui
2445                  switch (text[i])                  switch (text[i])
2446                  {                  {
2447                          case 0xff:                          case 0xff:
2448                                  if (i + 2 < length)                                  if (i + 3 > length)
                                         cache_put_text(text[i + 1], text, text[i + 2]);  
                                 else  
2449                                  {                                  {
2450                                          error("this shouldn't be happening\n");                                          /* short command, skip */
2451                                          exit(1);                                          i = length = 0;
2452                                            break;
2453                                  }                                  }
2454                                    cache_put_text(text[i + 1], text, text[i + 2]);
2455                                    i += 3;
2456                                    length -= i;
2457                                  /* this will move pointer from start to first character after FF command */                                  /* this will move pointer from start to first character after FF command */
2458                                  length -= i + 3;                                  text = &(text[i]);
                                 text = &(text[i + 3]);  
2459                                  i = 0;                                  i = 0;
2460                                  break;                                  break;
2461    
2462                          case 0xfe:                          case 0xfe:
2463                                    if (i + 3 > length)
2464                                    {
2465                                            /* short command, skip */
2466                                            i = length = 0;
2467                                            break;
2468                                    }
2469                                  entry = cache_get_text(text[i + 1]);                                  entry = cache_get_text(text[i + 1]);
2470                                  if (entry != NULL)                                  if (entry != NULL)
2471                                  {                                  {
# Line 2470  ui_draw_text(uint8 font, uint8 flags, ui Line 2480  ui_draw_text(uint8 font, uint8 flags, ui
2480                                          for (j = 0; j < entry->size; j++)                                          for (j = 0; j < entry->size; j++)
2481                                                  DO_GLYPH(((uint8 *) (entry->data)), j);                                                  DO_GLYPH(((uint8 *) (entry->data)), j);
2482                                  }                                  }
2483                                  if (i + 2 < length)                                  i += 3;
                                         i += 3;  
                                 else  
                                         i += 2;  
2484                                  length -= i;                                  length -= i;
2485                                  /* this will move pointer from start to first character after FE command */                                  /* this will move pointer from start to first character after FE command */
2486                                  text = &(text[i]);                                  text = &(text[i]);

Legend:
Removed from v.988  
changed lines
  Added in v.1029

  ViewVC Help
Powered by ViewVC 1.1.26