/[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 487 by astrand, Mon Oct 13 12:34:15 2003 UTC revision 500 by astrand, Wed Oct 15 14:32:43 2003 UTC
# Line 333  translate15to16(uint16 * data, uint8 * o Line 333  translate15to16(uint16 * data, uint8 * o
333    
334                  if (g_host_be)                  if (g_host_be)
335                  {                  {
336                          BSWAP16(pixel)                  BSWAP16(pixel)}
                 }  
337    
338                  value = make_colour16(split_colour15(pixel));                  value = make_colour16(split_colour15(pixel));
339    
# Line 363  translate15to24(uint16 * data, uint8 * o Line 362  translate15to24(uint16 * data, uint8 * o
362    
363                  if (g_host_be)                  if (g_host_be)
364                  {                  {
365                          BSWAP16(pixel)                  BSWAP16(pixel)}
                 }  
366    
367                  value = make_colour24(split_colour15(pixel));                  value = make_colour24(split_colour15(pixel));
368                  if (g_xserver_be)                  if (g_xserver_be)
# Line 457  translate16to24(uint16 * data, uint8 * o Line 455  translate16to24(uint16 * data, uint8 * o
455    
456                  if (g_host_be)                  if (g_host_be)
457                  {                  {
458                          BSWAP16(pixel)                  BSWAP16(pixel)}
                 }  
459    
460                  value = make_colour24(split_colour16(pixel));                  value = make_colour24(split_colour16(pixel));
461    
# Line 489  translate16to32(uint16 * data, uint8 * o Line 486  translate16to32(uint16 * data, uint8 * o
486    
487                  if (g_host_be)                  if (g_host_be)
488                  {                  {
489                          BSWAP16(pixel)                  BSWAP16(pixel)}
                 }  
490    
491                  value = make_colour32(split_colour16(pixel));                  value = make_colour32(split_colour16(pixel));
492    
# Line 500  translate16to32(uint16 * data, uint8 * o Line 496  translate16to32(uint16 * data, uint8 * o
496                          *(out++) = value >> 16;                          *(out++) = value >> 16;
497                          *(out++) = value >> 8;                          *(out++) = value >> 8;
498                          *(out++) = value;                          *(out++) = value;
499                  }                  }
500                  else                  else
501                  {                  {
502                          *(out++) = value;                          *(out++) = value;
503                          *(out++) = value >> 8;                          *(out++) = value >> 8;
504                          *(out++) = value >> 16;                          *(out++) = value >> 16;
505                          *(out++) = value >> 24;                          *(out++) = value >> 24;
506                  }                  }
507          }          }
508  }  }
509    
510  static void  static void
# Line 723  ui_init(void) Line 719  ui_init(void)
719          g_host_be = !(BOOL) (*(uint8 *) (&test));          g_host_be = !(BOOL) (*(uint8 *) (&test));
720          g_xserver_be = (ImageByteOrder(g_display) == MSBFirst);          g_xserver_be = (ImageByteOrder(g_display) == MSBFirst);
721    
722          if ((g_width == 0) || (g_height == 0))          /*
723             * Determine desktop size
724             */
725            if (g_width < 0)
726            {
727                    /* Percent of screen */
728                    g_height = HeightOfScreen(g_screen) * (-g_width) / 100;
729                    g_width = WidthOfScreen(g_screen) * (-g_width) / 100;
730            }
731            else if (g_width == 0)
732          {          {
733                  /* Fetch geometry from _NET_WORKAREA */                  /* Fetch geometry from _NET_WORKAREA */
734                  uint32 x, y, cx, cy;                  uint32 x, y, cx, cy;
# Line 740  ui_init(void) Line 745  ui_init(void)
745                          g_height = 600;                          g_height = 600;
746                  }                  }
747          }          }
748            else if (g_fullscreen)
         if (g_fullscreen)  
749          {          {
750                  g_width = WidthOfScreen(g_screen);                  g_width = WidthOfScreen(g_screen);
751                  g_height = HeightOfScreen(g_screen);                  g_height = HeightOfScreen(g_screen);
# Line 763  ui_init(void) Line 767  ui_init(void)
767    
768          g_mod_map = XGetModifierMapping(g_display);          g_mod_map = XGetModifierMapping(g_display);
769    
770            xkeymap_init();
771    
772          if (g_enable_compose)          if (g_enable_compose)
773                  g_IM = XOpenIM(g_display, NULL, NULL, NULL);                  g_IM = XOpenIM(g_display, NULL, NULL, NULL);
774    
         xkeymap_init();  
775          xclip_init();          xclip_init();
776    
777          /* todo take this out when high colour is done */          /* todo take this out when high colour is done */
# Line 1202  ui_select(int rdp_socket) Line 1207  ui_select(int rdp_socket)
1207                  {                  {
1208                          FD_SET(g_dsp_fd, &wfds);                          FD_SET(g_dsp_fd, &wfds);
1209                          n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;                          n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;
1210                  }                  }
1211  #endif  #endif
1212    
1213                  switch (select(n, &rfds, &wfds, NULL, NULL))                  switch (select(n, &rfds, &wfds, NULL, NULL))

Legend:
Removed from v.487  
changed lines
  Added in v.500

  ViewVC Help
Powered by ViewVC 1.1.26