/[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 1199 by astrand, Mon Mar 27 08:17:34 2006 UTC revision 1246 by stargo, Tue Jul 11 17:22:24 2006 UTC
# Line 1314  calculate_mask_weight(uint32 mask) Line 1314  calculate_mask_weight(uint32 mask)
1314  }  }
1315    
1316  static BOOL  static BOOL
1317  select_visual()  select_visual(int screen_num)
1318  {  {
1319          XPixmapFormatValues *pfm;          XPixmapFormatValues *pfm;
1320          int pixmap_formats_count, visuals_count;          int pixmap_formats_count, visuals_count;
# Line 1325  select_visual() Line 1325  select_visual()
1325    
1326          red_weight = blue_weight = green_weight = 0;          red_weight = blue_weight = green_weight = 0;
1327    
1328            if (g_server_depth == -1)
1329            {
1330                    g_server_depth = DisplayPlanes(g_display, DefaultScreen(g_display));
1331            }
1332    
1333          pfm = XListPixmapFormats(g_display, &pixmap_formats_count);          pfm = XListPixmapFormats(g_display, &pixmap_formats_count);
1334          if (pfm == NULL)          if (pfm == NULL)
1335          {          {
# Line 1335  select_visual() Line 1340  select_visual()
1340    
1341          /* Search for best TrueColor visual */          /* Search for best TrueColor visual */
1342          template.class = TrueColor;          template.class = TrueColor;
1343          vmatches = XGetVisualInfo(g_display, VisualClassMask, &template, &visuals_count);          template.screen = screen_num;
1344            vmatches = XGetVisualInfo(g_display, VisualClassMask | VisualScreenMask, &template, &visuals_count);
1345          g_visual = NULL;          g_visual = NULL;
1346          g_no_translate_image = False;          g_no_translate_image = False;
1347          g_compatible_arch = False;          g_compatible_arch = False;
# Line 1344  select_visual() Line 1350  select_visual()
1350                  for (i = 0; i < visuals_count; ++i)                  for (i = 0; i < visuals_count; ++i)
1351                  {                  {
1352                          XVisualInfo *visual_info = &vmatches[i];                          XVisualInfo *visual_info = &vmatches[i];
1353                            BOOL can_translate_to_bpp = False;
1354                            int j;
1355    
1356                          /* Try to find a no-translation visual that'll                          /* Try to find a no-translation visual that'll
1357                             allow us to use RDP bitmaps directly as ZPixmaps. */                             allow us to use RDP bitmaps directly as ZPixmaps. */
# Line 1387  select_visual() Line 1395  select_visual()
1395    
1396                          /* Only care for visuals, for whose BPPs (not depths!)                          /* Only care for visuals, for whose BPPs (not depths!)
1397                             we have a translateXtoY function. */                             we have a translateXtoY function. */
                         BOOL can_translate_to_bpp = False;  
                         int j;  
1398                          for (j = 0; j < pixmap_formats_count; ++j)                          for (j = 0; j < pixmap_formats_count; ++j)
1399                          {                          {
1400                                  if (pfm[j].depth == visual_info->depth)                                  if (pfm[j].depth == visual_info->depth)
# Line 1540  ui_init(void) Line 1546  ui_init(void)
1546          g_screen = ScreenOfDisplay(g_display, screen_num);          g_screen = ScreenOfDisplay(g_display, screen_num);
1547          g_depth = DefaultDepthOfScreen(g_screen);          g_depth = DefaultDepthOfScreen(g_screen);
1548    
1549          if (!select_visual())          if (!select_visual(screen_num))
1550                  return False;                  return False;
1551    
1552          if (g_no_translate_image)          if (g_no_translate_image)
# Line 1636  ui_deinit(void) Line 1642  ui_deinit(void)
1642                  sw_remove_window(g_seamless_windows);                  sw_remove_window(g_seamless_windows);
1643          }          }
1644    
1645            xclip_deinit();
1646    
1647          if (g_IM != NULL)          if (g_IM != NULL)
1648                  XCloseIM(g_IM);                  XCloseIM(g_IM);
1649    
# Line 3466  ui_seamless_destroy_window(unsigned long Line 3474  ui_seamless_destroy_window(unsigned long
3474  }  }
3475    
3476    
3477    void
3478    ui_seamless_destroy_group(unsigned long id, unsigned long flags)
3479    {
3480            seamless_window *sw, *sw_next;
3481    
3482            if (!g_seamless_active)
3483                    return;
3484    
3485            for (sw = g_seamless_windows; sw; sw = sw_next)
3486            {
3487                    sw_next = sw->next;
3488    
3489                    if (sw->group->id == id)
3490                    {
3491                            XDestroyWindow(g_display, sw->wnd);
3492                            sw_remove_window(sw);
3493                    }
3494            }
3495    }
3496    
3497    
3498  void  void
3499  ui_seamless_move_window(unsigned long id, int x, int y, int width, int height, unsigned long flags)  ui_seamless_move_window(unsigned long id, int x, int y, int width, int height, unsigned long flags)
3500  {  {

Legend:
Removed from v.1199  
changed lines
  Added in v.1246

  ViewVC Help
Powered by ViewVC 1.1.26