/[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 1413 by ossman_, Mon Jun 18 12:00:34 2007 UTC revision 1453 by astrand, Fri Mar 14 07:39:38 2008 UTC
# Line 583  translate_colour(uint32 colour) Line 583  translate_colour(uint32 colour)
583                          SPLITCOLOUR16(colour, pc);                          SPLITCOLOUR16(colour, pc);
584                          break;                          break;
585                  case 24:                  case 24:
586                    case 32:
587                          SPLITCOLOUR24(colour, pc);                          SPLITCOLOUR24(colour, pc);
588                          break;                          break;
589                  default:                  default:
# Line 1191  translate_image(int width, int height, u Line 1192  translate_image(int width, int height, u
1192             is only set for compatible depths, but the RDP depth might've             is only set for compatible depths, but the RDP depth might've
1193             changed during connection negotiations.             changed during connection negotiations.
1194           */           */
1195    
1196            /* todo */
1197            if (g_server_depth == 32 && g_depth == 24)
1198            {
1199                    return data;
1200            }
1201    
1202          if (g_no_translate_image)          if (g_no_translate_image)
1203          {          {
1204                  if ((g_depth == 15 && g_server_depth == 15) ||                  if ((g_depth == 15 && g_server_depth == 15) ||
# Line 2020  xwin_process_events(void) Line 2028  xwin_process_events(void)
2028                                  /* the window manager told us to quit */                                  /* the window manager told us to quit */
2029                                  if ((xevent.xclient.message_type == g_protocol_atom)                                  if ((xevent.xclient.message_type == g_protocol_atom)
2030                                      && ((Atom) xevent.xclient.data.l[0] == g_kill_atom))                                      && ((Atom) xevent.xclient.data.l[0] == g_kill_atom))
2031                                          /* Quit */                                  {
2032                                          return 0;                                          /* When killing a seamless window, close the window on the
2033                                               serverside instead of terminating rdesktop */
2034                                            sw = sw_get_window_by_wnd(xevent.xclient.window);
2035                                            if (!sw)
2036                                                    /* Otherwise, quit */
2037                                                    return 0;
2038                                            /* send seamless destroy process message */
2039                                            seamless_send_destroy(sw->id);
2040                                    }
2041                                  break;                                  break;
2042    
2043                          case KeyPress:                          case KeyPress:
# Line 3444  ui_seamless_create_window(unsigned long Line 3460  ui_seamless_create_window(unsigned long
3460                  ewmh_set_window_modal(wnd);                  ewmh_set_window_modal(wnd);
3461          }          }
3462    
3463            if (flags & SEAMLESSRDP_CREATE_TOPMOST)
3464            {
3465                    /* Make window always-on-top */
3466                    ewmh_set_window_above(wnd);
3467            }
3468    
3469          /* FIXME: Support for Input Context:s */          /* FIXME: Support for Input Context:s */
3470    
3471          get_input_mask(&input_mask);          get_input_mask(&input_mask);
# Line 3451  ui_seamless_create_window(unsigned long Line 3473  ui_seamless_create_window(unsigned long
3473    
3474          XSelectInput(g_display, wnd, input_mask);          XSelectInput(g_display, wnd, input_mask);
3475    
3476          /* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a          /* handle the WM_DELETE_WINDOW protocol. */
            seamless window, we could try to close the window on the  
            serverside, instead of terminating rdesktop */  
3477          XSetWMProtocols(g_display, wnd, &g_kill_atom, 1);          XSetWMProtocols(g_display, wnd, &g_kill_atom, 1);
3478    
3479          sw = xmalloc(sizeof(seamless_window));          sw = xmalloc(sizeof(seamless_window));
# Line 3682  ui_seamless_restack_window(unsigned long Line 3702  ui_seamless_restack_window(unsigned long
3702                  sw_behind = sw_get_window_by_id(behind);                  sw_behind = sw_get_window_by_id(behind);
3703                  if (!sw_behind)                  if (!sw_behind)
3704                  {                  {
3705                          warning("ui_seamless_restack_window: No information for window 0x%lx\n",                          warning("ui_seamless_restack_window: No information for behind window 0x%lx\n", behind);
                                 behind);  
3706                          return;                          return;
3707                  }                  }
3708    
3709                  wnds[1] = sw_behind->wnd;                  wnds[1] = sw->wnd;
3710                  wnds[0] = sw->wnd;                  wnds[0] = sw_behind->wnd;
3711    
3712                  XRestackWindows(g_display, wnds, 2);                  XRestackWindows(g_display, wnds, 2);
3713          }          }
# Line 3698  ui_seamless_restack_window(unsigned long Line 3717  ui_seamless_restack_window(unsigned long
3717          }          }
3718    
3719          sw_restack_window(sw, behind);          sw_restack_window(sw, behind);
3720    
3721            if (flags & SEAMLESSRDP_CREATE_TOPMOST)
3722            {
3723                    /* Make window always-on-top */
3724                    ewmh_set_window_above(sw->wnd);
3725            }
3726  }  }
3727    
3728    

Legend:
Removed from v.1413  
changed lines
  Added in v.1453

  ViewVC Help
Powered by ViewVC 1.1.26