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.

95 lines
3.2 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/nikolaus/rdesktop/krdc-embed.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./rdesktop.c.orig 2004-03-08 18:02:58.000000000 +0100
  20. +++ ./rdesktop.c 2004-03-09 22:32:19.000000000 +0100
  21. @@ -27,6 +27,7 @@
  22. #include <sys/time.h> /* gettimeofday */
  23. #include <sys/times.h> /* times */
  24. #include <errno.h>
  25. +#include <X11/Xlib.h> /* Window */
  26. #include "rdesktop.h"
  27. #ifdef EGD_SOCKET
  28. @@ -68,6 +69,7 @@
  29. BOOL g_console_session = False;
  30. BOOL g_numlock_sync = False;
  31. extern BOOL g_owncolmap;
  32. +extern Window g_embed_wnd;
  33. #ifdef WITH_RDPSND
  34. BOOL g_rdpsnd = False;
  35. @@ -112,6 +114,7 @@
  36. fprintf(stderr, " -S: caption button size (single application mode)\n");
  37. fprintf(stderr, " -T: window title\n");
  38. fprintf(stderr, " -N: enable numlock synchronisation\n");
  39. + fprintf(stderr, " -X: embed into another window with a given id.\n");
  40. fprintf(stderr, " -a: connection colour depth\n");
  41. fprintf(stderr, " -r: enable specified device redirection (currently: sound)\n");
  42. fprintf(stderr, " -0: attach to console\n");
  43. @@ -224,6 +227,7 @@
  44. prompt_password = False;
  45. domain[0] = password[0] = shell[0] = directory[0] = 0;
  46. strcpy(keymapname, "en-us");
  47. + g_embed_wnd = 0;
  48. #ifdef RDP2VNC
  49. #define VNCOPT "V:Q:"
  50. @@ -231,7 +235,7 @@
  51. #define VNCOPT
  52. #endif
  53. - while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbeEmCDKS:T:Na:r:045h?")) != -1)
  54. + while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbeEmCDKS:T:NX:a:r:045h?")) != -1)
  55. {
  56. switch (c)
  57. {
  58. @@ -374,6 +378,10 @@
  59. g_numlock_sync = True;
  60. break;
  61. + case 'X':
  62. + g_embed_wnd = strtod(optarg, NULL);
  63. + break;
  64. +
  65. case 'a':
  66. g_server_bpp = strtol(optarg, NULL, 10);
  67. if (g_server_bpp != 8 && g_server_bpp != 16 && g_server_bpp != 15
  68. --- ./xwin.c.orig 2004-03-08 18:02:58.000000000 +0100
  69. +++ ./xwin.c 2004-03-10 16:17:59.000000000 +0100
  70. @@ -41,6 +41,7 @@
  71. static int g_x_socket;
  72. static Screen *g_screen;
  73. Window g_wnd;
  74. +Window g_embed_wnd;
  75. BOOL g_enable_compose = False;
  76. static GC g_gc;
  77. static BOOL g_gc_initialized = False;
  78. @@ -929,6 +930,11 @@
  79. XFree(sizehints);
  80. }
  81. + if ( g_embed_wnd )
  82. + {
  83. + XReparentWindow(g_display, g_wnd, g_embed_wnd, 0, 0);
  84. + }
  85. +
  86. input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
  87. VisibilityChangeMask | FocusChangeMask;