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.

xserver15.patch 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. diff -up xserver/configure.ac.vnc xserver/configure.ac
  2. --- xserver/configure.ac.vnc 2011-05-11 11:02:51.229669941 +0200
  3. +++ xserver/configure.ac 2011-05-11 11:03:07.754072695 +0200
  4. @@ -31,7 +31,7 @@ RELEASE_DATE="5 November 2008"
  5. REMEMBER_REMEMBER="The Fifth of November"
  6. AC_CONFIG_SRCDIR([Makefile.am])
  7. AM_INIT_AUTOMAKE([dist-bzip2 foreign])
  8. -AM_MAINTAINER_MODE
  9. +m4_pattern_allow([AC_DEFINE])
  10. dnl this gets generated by autoheader, and thus contains all the defines. we
  11. dnl don't ever actually use it, internally.
  12. @@ -54,6 +54,7 @@ dnl kdrive-config.h covers the kdrive DD
  13. AC_CONFIG_HEADERS(include/kdrive-config.h)
  14. AC_PROG_CC
  15. +AC_PROG_CXX
  16. AM_PROG_AS
  17. AC_PROG_INSTALL
  18. AC_PROG_LN_S
  19. @@ -1010,7 +1011,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten
  20. AC_DEFINE(XKB, 1, [Build XKB])
  21. AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
  22. -AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
  23. +AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default])
  24. REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
  25. XKB_LIB='$(top_builddir)/xkb/libxkb.la'
  26. XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
  27. @@ -1220,6 +1221,9 @@ if test "x$XVFB" = xyes; then
  28. AC_SUBST([XVFB_SYS_LIBS])
  29. fi
  30. +dnl Xvnc DDX
  31. +AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC $RANDR_INC"])
  32. +AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"])
  33. dnl Xnest DDX
  34. @@ -1314,6 +1318,8 @@ xorg_bus_ppcpci=no
  35. xorg_bus_sparcpci=no
  36. xorg_bus_sparc=no
  37. +AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
  38. +
  39. if test "x$XORG" = xyes -o "x$XGL" = xyes; then
  40. XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
  41. XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
  42. @@ -1521,7 +1527,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xye
  43. AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
  44. AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
  45. AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server])
  46. - AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
  47. AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
  48. AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
  49. AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
  50. @@ -2184,6 +2189,7 @@ hw/dmx/input/Makefile
  51. hw/dmx/glxProxy/Makefile
  52. hw/dmx/Makefile
  53. hw/vfb/Makefile
  54. +hw/vnc/Makefile
  55. hw/xgl/Makefile
  56. hw/xgl/egl/Makefile
  57. hw/xgl/egl/module/Makefile
  58. diff -up xserver/hw/Makefile.am.vnc xserver/hw/Makefile.am
  59. --- xserver/hw/Makefile.am.vnc 2011-05-11 11:02:51.809648976 +0200
  60. +++ xserver/hw/Makefile.am 2011-05-11 11:03:07.754072695 +0200
  61. @@ -43,7 +43,8 @@ SUBDIRS = \
  62. $(DMX_SUBDIRS) \
  63. $(KDRIVE_SUBDIRS) \
  64. $(XQUARTZ_SUBDIRS) \
  65. - $(XPRINT_SUBDIRS)
  66. + $(XPRINT_SUBDIRS) \
  67. + vnc
  68. DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint
  69. diff -up xserver/mi/miinitext.c.vnc xserver/mi/miinitext.c
  70. --- xserver/mi/miinitext.c.vnc 2011-05-11 11:02:53.156600294 +0200
  71. +++ xserver/mi/miinitext.c 2011-05-11 11:03:31.079229673 +0200
  72. @@ -292,6 +292,9 @@ extern void BigReqExtensionInit(INITARGS
  73. #ifdef MITMISC
  74. extern void MITMiscExtensionInit(INITARGS);
  75. #endif
  76. +#ifdef TIGERVNC
  77. +extern void vncExtensionInit(INITARGS);
  78. +#endif
  79. #ifdef XIDLE
  80. extern void XIdleExtensionInit(INITARGS);
  81. #endif
  82. @@ -566,6 +569,9 @@ InitExtensions(argc, argv)
  83. #ifdef MITMISC
  84. if (!noMITMiscExtension) MITMiscExtensionInit();
  85. #endif
  86. +#ifdef TIGERVNC
  87. + vncExtensionInit();
  88. +#endif
  89. #ifdef XIDLE
  90. if (!noXIdleExtension) XIdleExtensionInit();
  91. #endif
  92. --- xserver/os/WaitFor.c.orig 2011-10-07 12:57:57.000000000 +0200
  93. +++ xserver/os/WaitFor.c 2011-10-07 13:21:11.000000000 +0200
  94. @@ -125,6 +125,9 @@
  95. static void CheckAllTimers(void);
  96. static OsTimerPtr timers = NULL;
  97. +extern void vncWriteBlockHandler(fd_set *fds);
  98. +extern void vncWriteWakeupHandler(int nfds, fd_set *fds);
  99. +
  100. /*****************
  101. * WaitForSomething:
  102. * Make the server suspend until there is
  103. @@ -150,6 +153,7 @@
  104. INT32 timeout = 0;
  105. fd_set clientsReadable;
  106. fd_set clientsWritable;
  107. + fd_set socketsWritable;
  108. int curclient;
  109. int selecterr;
  110. int nready;
  111. @@ -220,23 +224,29 @@
  112. SmartScheduleStopTimer ();
  113. #endif
  114. + FD_ZERO(&socketsWritable);
  115. + vncWriteBlockHandler(&socketsWritable);
  116. BlockHandler((pointer)&wt, (pointer)&LastSelectMask);
  117. if (NewOutputPending)
  118. FlushAllOutput();
  119. /* keep this check close to select() call to minimize race */
  120. if (dispatchException)
  121. i = -1;
  122. - else if (AnyClientsWriteBlocked)
  123. - {
  124. - XFD_COPYSET(&ClientsWriteBlocked, &clientsWritable);
  125. - i = Select (MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
  126. - }
  127. - else
  128. - {
  129. - i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt);
  130. + else {
  131. + if (AnyClientsWriteBlocked)
  132. + XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable);
  133. +
  134. + if (XFD_ANYSET(&socketsWritable)) {
  135. + i = Select (MaxClients, &LastSelectMask, &socketsWritable, NULL, wt);
  136. + if (AnyClientsWriteBlocked)
  137. + XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked);
  138. + } else {
  139. + i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt);
  140. + }
  141. }
  142. selecterr = GetErrno();
  143. WakeupHandler(i, (pointer)&LastSelectMask);
  144. + vncWriteWakeupHandler(i, &socketsWritable);
  145. #ifdef SMART_SCHEDULE
  146. SmartScheduleStartTimer ();
  147. #endif