Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

xserver117.patch 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. diff -up xorg-server-1.17.1/configure.ac.vnc xorg-server-1.17.1/configure.ac
  2. --- xorg-server-1.17.1/configure.ac.vnc 2015-02-10 22:43:52.000000000 +0000
  3. +++ xorg-server-1.17.1/configure.ac 2015-02-13 16:14:05.074515927 +0000
  4. @@ -74,6 +74,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. LT_PREREQ([2.2])
  10. LT_INIT([disable-static win32-dll])
  11. @@ -1795,6 +1796,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 $DRI3_LIB $PRESENT_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. @@ -1830,6 +1835,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. @@ -2059,7 +2066,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. @@ -2599,6 +2605,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 xorg-server-1.17.1/hw/Makefile.am.vnc xorg-server-1.17.1/hw/Makefile.am
  44. --- xorg-server-1.17.1/hw/Makefile.am.vnc 2014-04-16 21:24:00.000000000 +0100
  45. +++ xorg-server-1.17.1/hw/Makefile.am 2015-02-13 16:14:05.131516821 +0000
  46. @@ -38,7 +38,8 @@ SUBDIRS = \
  47. $(DMX_SUBDIRS) \
  48. $(KDRIVE_SUBDIRS) \
  49. $(XQUARTZ_SUBDIRS) \
  50. - $(XWAYLAND_SUBDIRS)
  51. + $(XWAYLAND_SUBDIRS) \
  52. + vnc
  53. DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
  54. diff -up xorg-server-1.17.1/mi/miinitext.c.vnc xorg-server-1.17.1/mi/miinitext.c
  55. --- xorg-server-1.17.1/mi/miinitext.c.vnc 2015-01-17 23:42:52.000000000 +0000
  56. +++ xorg-server-1.17.1/mi/miinitext.c 2015-02-13 16:14:05.131516821 +0000
  57. @@ -111,6 +111,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. @@ -235,6 +239,9 @@ EnableDisableExtensionError(const char *
  68. /* List of built-in (statically linked) extensions */
  69. static const 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 xorg-server-1.17.1/os/WaitFor.c.vnc xorg-server-1.17.1/os/WaitFor.c
  77. --- xorg-server-1.17.1/os/WaitFor.c.vnc 2015-01-26 18:40:30.000000000 +0000
  78. +++ xorg-server-1.17.1/os/WaitFor.c 2015-02-13 16:14:05.132516837 +0000
  79. @@ -125,6 +125,9 @@ static void DoTimer(OsTimerPtr timer, CA
  80. static void CheckAllTimers(void);
  81. static volatile 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. @@ -150,6 +153,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. @@ -212,6 +216,9 @@ WaitForSomething(int *pClientsReady)
  97. XFD_COPYSET(&AllSockets, &LastSelectMask);
  98. }
  99. + FD_ZERO(&socketsWritable);
  100. + vncWriteBlockHandler(&socketsWritable);
  101. +
  102. BlockHandler((void *) &wt, (void *) &LastSelectMask);
  103. if (NewOutputPending)
  104. FlushAllOutput();
  105. @@ -223,10 +230,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, (void *) &LastSelectMask);
  123. + vncWriteWakeupHandler(i, &socketsWritable);
  124. if (i <= 0) { /* An error or timeout occurred */
  125. if (dispatchException)
  126. return 0;