您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

xserver118.patch 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. diff -ur xorg-server.orig/configure.ac xorg-server/configure.ac
  2. --- xorg-server.orig/configure.ac 2016-04-09 21:28:27.007999965 +0200
  3. +++ xorg-server/configure.ac 2016-04-09 21:28:57.587999860 +0200
  4. @@ -74,6 +74,7 @@
  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. @@ -1828,6 +1829,10 @@
  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. @@ -1863,6 +1868,8 @@
  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. @@ -2081,7 +2088,6 @@
  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. @@ -2653,6 +2659,7 @@
  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 -ur xorg-server.orig/hw/Makefile.am xorg-server/hw/Makefile.am
  44. --- xorg-server.orig/hw/Makefile.am 2016-04-09 21:28:27.059999965 +0200
  45. +++ xorg-server/hw/Makefile.am 2016-04-09 21:28:57.587999860 +0200
  46. @@ -43,6 +43,7 @@
  47. $(KDRIVE_SUBDIRS) \
  48. $(XQUARTZ_SUBDIRS) \
  49. - $(XWAYLAND_SUBDIRS)
  50. + $(XWAYLAND_SUBDIRS) \
  51. + vnc
  52. DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
  53. diff -ur xorg-server.orig/mi/miinitext.c xorg-server/mi/miinitext.c
  54. --- xorg-server.orig/mi/miinitext.c 2016-04-09 21:28:27.015999965 +0200
  55. +++ xorg-server/mi/miinitext.c 2016-04-09 21:28:57.587999860 +0200
  56. @@ -114,6 +114,10 @@
  57. #include "micmap.h"
  58. #include "globals.h"
  59. +#ifdef TIGERVNC
  60. +extern void vncExtensionInit(void);
  61. +#endif
  62. +
  63. /* The following is only a small first step towards run-time
  64. * configurable extensions.
  65. */
  66. @@ -238,6 +242,9 @@
  67. /* List of built-in (statically linked) extensions */
  68. static const ExtensionModule staticExtensions[] = {
  69. +#ifdef TIGERVNC
  70. + {vncExtensionInit, "VNC-EXTENSION", NULL},
  71. +#endif
  72. {GEExtensionInit, "Generic Event Extension", &noGEExtension},
  73. {ShapeExtensionInit, "SHAPE", NULL},
  74. #ifdef MITSHM
  75. diff -ur xorg-server.orig/os/WaitFor.c xorg-server/os/WaitFor.c
  76. --- xorg-server.orig/os/WaitFor.c 2016-04-09 21:28:27.071999965 +0200
  77. +++ xorg-server/os/WaitFor.c 2016-04-09 21:28:57.587999860 +0200
  78. @@ -125,6 +125,9 @@
  79. static void CheckAllTimers(void);
  80. static volatile OsTimerPtr timers = NULL;
  81. +extern void vncWriteBlockHandler(fd_set *fds);
  82. +extern void vncWriteWakeupHandler(int nfds, fd_set *fds);
  83. +
  84. /*****************
  85. * WaitForSomething:
  86. * Make the server suspend until there is
  87. @@ -150,6 +153,7 @@
  88. INT32 timeout = 0;
  89. fd_set clientsReadable;
  90. fd_set clientsWritable;
  91. + fd_set socketsWritable;
  92. int curclient;
  93. int selecterr;
  94. static int nready;
  95. @@ -213,6 +217,9 @@
  96. XFD_COPYSET(&AllSockets, &LastSelectMask);
  97. }
  98. + FD_ZERO(&socketsWritable);
  99. + vncWriteBlockHandler(&socketsWritable);
  100. +
  101. BlockHandler((void *) &wt, (void *) &LastSelectMask);
  102. if (NewOutputPending)
  103. FlushAllOutput();
  104. @@ -224,10 +231,20 @@
  105. i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
  106. }
  107. else {
  108. - i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
  109. + if (AnyClientsWriteBlocked)
  110. + XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable);
  111. +
  112. + if (XFD_ANYSET(&socketsWritable)) {
  113. + i = Select(MaxClients, &LastSelectMask, &socketsWritable, NULL, wt);
  114. + if (AnyClientsWriteBlocked)
  115. + XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked);
  116. + } else {
  117. + i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
  118. + }
  119. }
  120. selecterr = GetErrno();
  121. WakeupHandler(i, (void *) &LastSelectMask);
  122. + vncWriteWakeupHandler(i, &socketsWritable);
  123. if (i <= 0) { /* An error or timeout occurred */
  124. if (dispatchException)
  125. return 0;