mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.3 KiB

  1. --- ./rdesktop.c.orig 2004-03-08 18:02:58.000000000 +0100
  2. +++ ./rdesktop.c 2004-03-09 22:32:19.000000000 +0100
  3. @@ -27,6 +27,7 @@
  4. #include <sys/time.h> /* gettimeofday */
  5. #include <sys/times.h> /* times */
  6. #include <errno.h>
  7. +#include <X11/Xlib.h> /* Window */
  8. #include "rdesktop.h"
  9. #ifdef EGD_SOCKET
  10. @@ -68,6 +69,7 @@
  11. BOOL g_console_session = False;
  12. BOOL g_numlock_sync = False;
  13. extern BOOL g_owncolmap;
  14. +extern Window g_embed_wnd;
  15. #ifdef WITH_RDPSND
  16. BOOL g_rdpsnd = False;
  17. @@ -112,6 +114,7 @@
  18. fprintf(stderr, " -S: caption button size (single application mode)\n");
  19. fprintf(stderr, " -T: window title\n");
  20. fprintf(stderr, " -N: enable numlock synchronisation\n");
  21. + fprintf(stderr, " -X: embed into another window with a given id.\n");
  22. fprintf(stderr, " -a: connection colour depth\n");
  23. fprintf(stderr, " -r: enable specified device redirection (currently: sound)\n");
  24. fprintf(stderr, " -0: attach to console\n");
  25. @@ -224,6 +227,7 @@
  26. prompt_password = False;
  27. domain[0] = password[0] = shell[0] = directory[0] = 0;
  28. strcpy(keymapname, "en-us");
  29. + g_embed_wnd = 0;
  30. #ifdef RDP2VNC
  31. #define VNCOPT "V:Q:"
  32. @@ -231,7 +235,7 @@
  33. #define VNCOPT
  34. #endif
  35. - while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbeEmCDKS:T:Na:r:045h?")) != -1)
  36. + while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbeEmCDKS:T:NX:a:r:045h?")) != -1)
  37. {
  38. switch (c)
  39. {
  40. @@ -374,6 +378,10 @@
  41. g_numlock_sync = True;
  42. break;
  43. + case 'X':
  44. + g_embed_wnd = strtod(optarg, NULL);
  45. + break;
  46. +
  47. case 'a':
  48. g_server_bpp = strtol(optarg, NULL, 10);
  49. if (g_server_bpp != 8 && g_server_bpp != 16 && g_server_bpp != 15
  50. --- ./xwin.c.orig 2004-03-08 18:02:58.000000000 +0100
  51. +++ ./xwin.c 2004-03-10 16:17:59.000000000 +0100
  52. @@ -41,6 +41,7 @@
  53. static int g_x_socket;
  54. static Screen *g_screen;
  55. Window g_wnd;
  56. +Window g_embed_wnd;
  57. BOOL g_enable_compose = False;
  58. static GC g_gc;
  59. static BOOL g_gc_initialized = False;
  60. @@ -929,6 +930,11 @@
  61. XFree(sizehints);
  62. }
  63. + if ( g_embed_wnd )
  64. + {
  65. + XReparentWindow(g_display, g_wnd, g_embed_wnd, 0, 0);
  66. + }
  67. +
  68. input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
  69. VisibilityChangeMask | FocusChangeMask;