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.

xserver114.patch 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. diff -up xserver/configure.ac.vnc xserver/configure.ac
  2. --- xserver/configure.ac.vnc 2013-04-09 16:35:38.000000000 +0200
  3. +++ xserver/configure.ac 2013-04-09 18:16:31.000000000 +0200
  4. @@ -72,6 +72,7 @@ dnl forcing an entire recompile.x
  5. AC_CONFIG_HEADERS(include/version-config.h)
  6. AM_PROG_AS
  7. +AC_PROG_CXX
  8. AC_PROG_LN_S
  9. AC_LIBTOOL_WIN32_DLL
  10. AC_DISABLE_STATIC
  11. @@ -1573,6 +1574,10 @@ if test "x$XVFB" = xyes; then
  12. AC_SUBST([XVFB_SYS_LIBS])
  13. fi
  14. +dnl Xvnc DDX
  15. +AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"])
  16. +AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB"])
  17. +AC_SUBST([XVNC_SYS_LIBS], ["$GLX_SYS_LIBS"])
  18. dnl Xnest DDX
  19. @@ -1608,6 +1613,8 @@ if test "x$XORG" = xauto; then
  20. fi
  21. AC_MSG_RESULT([$XORG])
  22. +AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
  23. +
  24. if test "x$XORG" = xyes; then
  25. XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
  26. XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
  27. @@ -1827,7 +1834,6 @@ if test "x$XORG" = xyes; then
  28. AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
  29. AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
  30. AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
  31. - AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
  32. AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
  33. AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
  34. AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
  35. @@ -2292,6 +2298,7 @@ hw/dmx/Makefile
  36. hw/dmx/man/Makefile
  37. hw/vfb/Makefile
  38. hw/vfb/man/Makefile
  39. +hw/vnc/Makefile
  40. hw/xnest/Makefile
  41. hw/xnest/man/Makefile
  42. hw/xwin/Makefile
  43. diff -up xserver/hw/Makefile.am.vnc xserver/hw/Makefile.am
  44. --- xserver/hw/Makefile.am.vnc 2013-04-09 16:36:46.000000000 +0200
  45. +++ xserver/hw/Makefile.am 2013-04-09 18:16:31.000000000 +0200
  46. @@ -33,7 +33,8 @@ SUBDIRS = \
  47. $(XNEST_SUBDIRS) \
  48. $(DMX_SUBDIRS) \
  49. $(KDRIVE_SUBDIRS) \
  50. - $(XQUARTZ_SUBDIRS)
  51. + $(XQUARTZ_SUBDIRS) \
  52. + vnc
  53. DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive
  54. diff -up xserver/mi/miinitext.c.vnc xserver/mi/miinitext.c
  55. --- xserver/mi/miinitext.c.vnc 2013-04-09 16:37:21.000000000 +0200
  56. +++ xserver/mi/miinitext.c 2013-04-09 18:16:31.000000000 +0200
  57. @@ -112,6 +112,10 @@ SOFTWARE.
  58. #include "micmap.h"
  59. #include "globals.h"
  60. +#ifdef TIGERVNC
  61. +extern void vncExtensionInit(void);
  62. +#endif
  63. +
  64. /* The following is only a small first step towards run-time
  65. * configurable extensions.
  66. */
  67. @@ -238,6 +242,9 @@ EnableDisableExtensionError(const char *
  68. /* List of built-in (statically linked) extensions */
  69. static ExtensionModule staticExtensions[] = {
  70. +#ifdef TIGERVNC
  71. + {vncExtensionInit, "VNC-EXTENSION", NULL},
  72. +#endif
  73. {GEExtensionInit, "Generic Event Extension", &noGEExtension},
  74. {ShapeExtensionInit, "SHAPE", NULL},
  75. #ifdef MITSHM
  76. diff -up xserver/os/WaitFor.c.vnc xserver/os/WaitFor.c
  77. --- xserver/os/WaitFor.c.vnc 2013-04-10 14:51:13.000000000 +0200
  78. +++ xserver/os/WaitFor.c 2013-04-10 14:55:40.000000000 +0200
  79. @@ -124,6 +124,9 @@ static void DoTimer(OsTimerPtr timer, CA
  80. static void CheckAllTimers(void);
  81. static OsTimerPtr timers = NULL;
  82. +extern void vncWriteBlockHandler(fd_set *fds);
  83. +extern void vncWriteWakeupHandler(int nfds, fd_set *fds);
  84. +
  85. /*****************
  86. * WaitForSomething:
  87. * Make the server suspend until there is
  88. @@ -149,6 +152,7 @@ WaitForSomething(int *pClientsReady)
  89. INT32 timeout = 0;
  90. fd_set clientsReadable;
  91. fd_set clientsWritable;
  92. + fd_set socketsWritable;
  93. int curclient;
  94. int selecterr;
  95. static int nready;
  96. @@ -207,6 +211,9 @@ WaitForSomething(int *pClientsReady)
  97. XFD_COPYSET(&AllSockets, &LastSelectMask);
  98. }
  99. + FD_ZERO(&socketsWritable);
  100. + vncWriteBlockHandler(&socketsWritable);
  101. +
  102. BlockHandler((pointer) &wt, (pointer) &LastSelectMask);
  103. if (NewOutputPending)
  104. FlushAllOutput();
  105. @@ -218,10 +225,20 @@ WaitForSomething(int *pClientsReady)
  106. i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
  107. }
  108. else {
  109. - i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
  110. + if (AnyClientsWriteBlocked)
  111. + XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable);
  112. +
  113. + if (XFD_ANYSET(&socketsWritable)) {
  114. + i = Select (MaxClients, &LastSelectMask, &socketsWritable, NULL, wt);
  115. + if (AnyClientsWriteBlocked)
  116. + XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked);
  117. + } else {
  118. + i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt);
  119. + }
  120. }
  121. selecterr = GetErrno();
  122. WakeupHandler(i, (pointer) &LastSelectMask);
  123. + vncWriteWakeupHandler(i, &socketsWritable);
  124. if (i <= 0) { /* An error or timeout occurred */
  125. if (dispatchException)
  126. return 0;