From 4bcfed2f9cf5dbf682d3bc98873ba97c4efdff44 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 20 Apr 2008 08:35:42 -0700 Subject: [PATCH] Revert "Removed XWin DDX" This reverts commit 6550078b0925f754e3eec3bbce94dbfe5de8c419. Doctor, I'm starting to get a pulse... --- .gitignore | 1 + configure.ac | 74 + hw/Makefile.am | 7 +- hw/xwin/ChangeLog | 683 +++++++ hw/xwin/InitInput.c | 177 ++ hw/xwin/InitOutput.c | 1144 +++++++++++ hw/xwin/Makefile.am | 197 ++ hw/xwin/README | 141 ++ hw/xwin/X-boxed.ico | Bin 0 -> 12902 bytes hw/xwin/X.ico | Bin 0 -> 20870 bytes hw/xwin/XWin.man | 287 +++ hw/xwin/XWin.rc | 109 + hw/xwin/XWinrc.man | 180 ++ hw/xwin/_usr_X11R6_lib_X11_system.XWinrc | 125 ++ hw/xwin/ddraw.h | 2106 ++++++++++++++++++++ hw/xwin/win.h | 1453 ++++++++++++++ hw/xwin/winallpriv.c | 172 ++ hw/xwin/winauth.c | 131 ++ hw/xwin/winblock.c | 106 + hw/xwin/winclip.c | 42 + hw/xwin/winclipboard.h | 164 ++ hw/xwin/winclipboardinit.c | 143 ++ hw/xwin/winclipboardtextconv.c | 159 ++ hw/xwin/winclipboardthread.c | 477 +++++ hw/xwin/winclipboardunicode.c | 69 + hw/xwin/winclipboardwndproc.c | 622 ++++++ hw/xwin/winclipboardwrappers.c | 541 +++++ hw/xwin/winclipboardxevents.c | 796 ++++++++ hw/xwin/wincmap.c | 674 +++++++ hw/xwin/winconfig.c | 1150 +++++++++++ hw/xwin/winconfig.h | 343 ++++ hw/xwin/wincreatewnd.c | 644 ++++++ hw/xwin/wincursor.c | 614 ++++++ hw/xwin/windialogs.c | 788 ++++++++ hw/xwin/winengine.c | 336 ++++ hw/xwin/winerror.c | 143 ++ hw/xwin/winfillsp.c | 866 ++++++++ hw/xwin/winfont.c | 80 + hw/xwin/wingc.c | 256 +++ hw/xwin/wingetsp.c | 192 ++ hw/xwin/winglobals.c | 138 ++ hw/xwin/winkeybd.c | 637 ++++++ hw/xwin/winkeybd.h | 309 +++ hw/xwin/winkeyhook.c | 194 ++ hw/xwin/winkeymap.h | 136 ++ hw/xwin/winkeynames.h | 202 ++ hw/xwin/winlayouts.h | 257 +++ hw/xwin/winmessages.h | 1030 ++++++++++ hw/xwin/winmisc.c | 152 ++ hw/xwin/winmouse.c | 341 ++++ hw/xwin/winms.h | 46 + hw/xwin/winmsg.c | 179 ++ hw/xwin/winmsg.h | 50 + hw/xwin/winmultiwindowclass.c | 325 +++ hw/xwin/winmultiwindowclass.h | 114 ++ hw/xwin/winmultiwindowicons.c | 478 +++++ hw/xwin/winmultiwindowshape.c | 211 ++ hw/xwin/winmultiwindowwindow.c | 1054 ++++++++++ hw/xwin/winmultiwindowwm.c | 1440 +++++++++++++ hw/xwin/winmultiwindowwndproc.c | 1049 ++++++++++ hw/xwin/winnativegdi.c | 546 +++++ hw/xwin/winpfbdd.c | 684 +++++++ hw/xwin/winpixmap.c | 235 +++ hw/xwin/winpolyline.c | 57 + hw/xwin/winprefs.c | 822 ++++++++ hw/xwin/winprefs.h | 162 ++ hw/xwin/winprefslex.l | 116 ++ hw/xwin/winprefsyacc.y | 353 ++++ hw/xwin/winpriv.c | 134 ++ hw/xwin/winpriv.h | 15 + hw/xwin/winprocarg.c | 1551 ++++++++++++++ hw/xwin/winpushpxl.c | 225 +++ hw/xwin/winrandr.c | 141 ++ hw/xwin/winregistry.c | 71 + hw/xwin/winresource.h | 55 + hw/xwin/winrop.c | 144 ++ hw/xwin/winscrinit.c | 781 ++++++++ hw/xwin/winsetsp.c | 186 ++ hw/xwin/winshaddd.c | 1442 ++++++++++++++ hw/xwin/winshadddnl.c | 1454 ++++++++++++++ hw/xwin/winshadgdi.c | 1324 ++++++++++++ hw/xwin/wintrayicon.c | 210 ++ hw/xwin/winvalargs.c | 188 ++ hw/xwin/winvideo.c | 210 ++ hw/xwin/winwakeup.c | 71 + hw/xwin/winwin32rootless.c | 1092 ++++++++++ hw/xwin/winwin32rootlesswindow.c | 476 +++++ hw/xwin/winwin32rootlesswndproc.c | 1325 ++++++++++++ hw/xwin/winwindow.c | 649 ++++++ hw/xwin/winwindow.h | 150 ++ hw/xwin/winwindowswm.c | 663 ++++++ hw/xwin/winwndproc.c | 1288 ++++++++++++ hw/xwin/xlaunch/COPYING | 25 + hw/xwin/xlaunch/Makefile | 79 + hw/xwin/xlaunch/config.cc | 282 +++ hw/xwin/xlaunch/config.h | 60 + hw/xwin/xlaunch/main.cc | 700 +++++++ hw/xwin/xlaunch/resources/dialog.rc | 118 ++ hw/xwin/xlaunch/resources/fullscreen.bmp | Bin 0 -> 22554 bytes hw/xwin/xlaunch/resources/images.rc | 29 + hw/xwin/xlaunch/resources/multiwindow.bmp | Bin 0 -> 22554 bytes hw/xwin/xlaunch/resources/nodecoration.bmp | Bin 0 -> 22554 bytes hw/xwin/xlaunch/resources/resources.h | 99 + hw/xwin/xlaunch/resources/resources.rc | 30 + hw/xwin/xlaunch/resources/strings.rc | 108 + hw/xwin/xlaunch/resources/windowed.bmp | Bin 0 -> 22554 bytes hw/xwin/xlaunch/window/dialog.cc | 86 + hw/xwin/xlaunch/window/dialog.h | 54 + hw/xwin/xlaunch/window/util.cc | 1112 +++++++++++ hw/xwin/xlaunch/window/util.h | 53 + hw/xwin/xlaunch/window/window.cc | 284 +++ hw/xwin/xlaunch/window/window.h | 114 ++ hw/xwin/xlaunch/window/wizard.cc | 244 +++ hw/xwin/xlaunch/window/wizard.h | 59 + include/xwin-config.h.in | 24 + 115 files changed, 44913 insertions(+), 1 deletion(-) create mode 100644 hw/xwin/ChangeLog create mode 100644 hw/xwin/InitInput.c create mode 100644 hw/xwin/InitOutput.c create mode 100644 hw/xwin/Makefile.am create mode 100644 hw/xwin/README create mode 100755 hw/xwin/X-boxed.ico create mode 100644 hw/xwin/X.ico create mode 100644 hw/xwin/XWin.man create mode 100644 hw/xwin/XWin.rc create mode 100755 hw/xwin/XWinrc.man create mode 100644 hw/xwin/_usr_X11R6_lib_X11_system.XWinrc create mode 100644 hw/xwin/ddraw.h create mode 100644 hw/xwin/win.h create mode 100644 hw/xwin/winallpriv.c create mode 100644 hw/xwin/winauth.c create mode 100644 hw/xwin/winblock.c create mode 100644 hw/xwin/winclip.c create mode 100644 hw/xwin/winclipboard.h create mode 100644 hw/xwin/winclipboardinit.c create mode 100644 hw/xwin/winclipboardtextconv.c create mode 100644 hw/xwin/winclipboardthread.c create mode 100644 hw/xwin/winclipboardunicode.c create mode 100644 hw/xwin/winclipboardwndproc.c create mode 100755 hw/xwin/winclipboardwrappers.c create mode 100644 hw/xwin/winclipboardxevents.c create mode 100644 hw/xwin/wincmap.c create mode 100644 hw/xwin/winconfig.c create mode 100644 hw/xwin/winconfig.h create mode 100644 hw/xwin/wincreatewnd.c create mode 100644 hw/xwin/wincursor.c create mode 100755 hw/xwin/windialogs.c create mode 100644 hw/xwin/winengine.c create mode 100644 hw/xwin/winerror.c create mode 100644 hw/xwin/winfillsp.c create mode 100644 hw/xwin/winfont.c create mode 100644 hw/xwin/wingc.c create mode 100644 hw/xwin/wingetsp.c create mode 100644 hw/xwin/winglobals.c create mode 100644 hw/xwin/winkeybd.c create mode 100644 hw/xwin/winkeybd.h create mode 100755 hw/xwin/winkeyhook.c create mode 100644 hw/xwin/winkeymap.h create mode 100644 hw/xwin/winkeynames.h create mode 100644 hw/xwin/winlayouts.h create mode 100755 hw/xwin/winmessages.h create mode 100644 hw/xwin/winmisc.c create mode 100644 hw/xwin/winmouse.c create mode 100644 hw/xwin/winms.h create mode 100644 hw/xwin/winmsg.c create mode 100644 hw/xwin/winmsg.h create mode 100755 hw/xwin/winmultiwindowclass.c create mode 100755 hw/xwin/winmultiwindowclass.h create mode 100644 hw/xwin/winmultiwindowicons.c create mode 100644 hw/xwin/winmultiwindowshape.c create mode 100644 hw/xwin/winmultiwindowwindow.c create mode 100644 hw/xwin/winmultiwindowwm.c create mode 100644 hw/xwin/winmultiwindowwndproc.c create mode 100644 hw/xwin/winnativegdi.c create mode 100644 hw/xwin/winpfbdd.c create mode 100644 hw/xwin/winpixmap.c create mode 100644 hw/xwin/winpolyline.c create mode 100644 hw/xwin/winprefs.c create mode 100644 hw/xwin/winprefs.h create mode 100644 hw/xwin/winprefslex.l create mode 100644 hw/xwin/winprefsyacc.y create mode 100644 hw/xwin/winpriv.c create mode 100644 hw/xwin/winpriv.h create mode 100755 hw/xwin/winprocarg.c create mode 100644 hw/xwin/winpushpxl.c create mode 100755 hw/xwin/winrandr.c create mode 100644 hw/xwin/winregistry.c create mode 100644 hw/xwin/winresource.h create mode 100644 hw/xwin/winrop.c create mode 100644 hw/xwin/winscrinit.c create mode 100644 hw/xwin/winsetsp.c create mode 100644 hw/xwin/winshaddd.c create mode 100644 hw/xwin/winshadddnl.c create mode 100644 hw/xwin/winshadgdi.c create mode 100755 hw/xwin/wintrayicon.c create mode 100755 hw/xwin/winvalargs.c create mode 100755 hw/xwin/winvideo.c create mode 100644 hw/xwin/winwakeup.c create mode 100755 hw/xwin/winwin32rootless.c create mode 100755 hw/xwin/winwin32rootlesswindow.c create mode 100755 hw/xwin/winwin32rootlesswndproc.c create mode 100644 hw/xwin/winwindow.c create mode 100644 hw/xwin/winwindow.h create mode 100755 hw/xwin/winwindowswm.c create mode 100644 hw/xwin/winwndproc.c create mode 100755 hw/xwin/xlaunch/COPYING create mode 100755 hw/xwin/xlaunch/Makefile create mode 100644 hw/xwin/xlaunch/config.cc create mode 100644 hw/xwin/xlaunch/config.h create mode 100755 hw/xwin/xlaunch/main.cc create mode 100755 hw/xwin/xlaunch/resources/dialog.rc create mode 100755 hw/xwin/xlaunch/resources/fullscreen.bmp create mode 100755 hw/xwin/xlaunch/resources/images.rc create mode 100755 hw/xwin/xlaunch/resources/multiwindow.bmp create mode 100755 hw/xwin/xlaunch/resources/nodecoration.bmp create mode 100755 hw/xwin/xlaunch/resources/resources.h create mode 100755 hw/xwin/xlaunch/resources/resources.rc create mode 100644 hw/xwin/xlaunch/resources/strings.rc create mode 100755 hw/xwin/xlaunch/resources/windowed.bmp create mode 100755 hw/xwin/xlaunch/window/dialog.cc create mode 100755 hw/xwin/xlaunch/window/dialog.h create mode 100644 hw/xwin/xlaunch/window/util.cc create mode 100644 hw/xwin/xlaunch/window/util.h create mode 100755 hw/xwin/xlaunch/window/window.cc create mode 100755 hw/xwin/xlaunch/window/window.h create mode 100755 hw/xwin/xlaunch/window/wizard.cc create mode 100755 hw/xwin/xlaunch/window/wizard.h create mode 100644 include/xwin-config.h.in diff --git a/.gitignore b/.gitignore index afd5415b0..548e78423 100644 --- a/.gitignore +++ b/.gitignore @@ -284,6 +284,7 @@ include/xgl-config.h include/xkb-config.h include/xorg-config.h include/xorg-server.h +include/xwin-config.h mfb/mfbbltC.c mfb/mfbbltCI.c mfb/mfbbltG.c diff --git a/configure.ac b/configure.ac index ca16c5a06..d3a231705 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,8 @@ dnl xorg-config.h covers the Xorg DDX. AC_CONFIG_HEADERS(include/xorg-config.h) dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs. AC_CONFIG_HEADERS(include/xkb-config.h) +dnl xwin-config.h covers the XWin DDX. +AC_CONFIG_HEADERS(include/xwin-config.h) dnl kdrive-config.h covers the kdrive DDX AC_CONFIG_HEADERS(include/kdrive-config.h) @@ -564,6 +566,7 @@ AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app for Xquartz (default: auto)]), [X11APP=$enableval], [X11APP=auto]) AC_ARG_WITH(x11app-archs, AS_HELP_STRING([--with-x11app-archs=ARCHS], [Architectures to build X11.app for, space delimeted (default: "ppc i386")]), [X11APP_ARCHS=$enableval], [X11APP_ARCHS="ppc i386"]) AC_SUBST([X11APP_ARCHS]) +AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no]) @@ -1636,6 +1639,76 @@ if test "x$XPRINT" = xyes; then fi AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes]) + +dnl XWin DDX + +AC_MSG_CHECKING([whether to build XWin DDX]) +if test "x$XWIN" = xauto; then + case $host_os in + cygwin*) XWIN="yes" ;; + mingw*) XWIN="yes" ;; + *) XWIN="no" ;; + esac + XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB" + AC_SUBST([XWIN_LIBS]) +fi +AC_MSG_RESULT([$XWIN]) + +if test "x$XWIN" = xyes; then + case $host_os in + cygwin*) + XWIN_SERVER_NAME=XWin + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) + AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) + AC_DEFINE(ROOTLESS,1,[Build Rootless code]) + CFLAGS="$CFLAGS -DFD_SETSIZE=256" + ;; + mingw*) + XWIN_SERVER_NAME=Xming + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) + AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location]) + AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets]) + XWIN_SYS_LIBS=-lwinsock2 + ;; + esac + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $(XWINMODULES_LIBS)" + AC_SUBST(XWIN_SERVER_NAME) + AC_SUBST(XWIN_SYS_LIBS) + + if test "x$DEBUGGING" = xyes; then + AC_DEFINE(CYGDEBUG, 1, [Simple debug messages]) + AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling]) + AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager]) + fi + + AC_DEFINE(DDXOSINIT, 1, [Use OsVendorInit]) + AC_DEFINE(DDXTIME, 1, [Use GetTimeInMillis]) + AC_DEFINE(DDXOSFATALERROR, 1, [Use OsVendorFatalError]) + AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF]) + AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) + if test "x$XF86VIDMODE" = xyes; then + AC_MSG_NOTICE([Disabling XF86VidMode extension]) + XF86VIDMODE=no + fi + if test "x$XF86MISC" = xyes; then + AC_MSG_NOTICE([Disabling XF86Misc extension]) + XF86MISC=no + fi + if test "x$COMPOSITE" = xyes; then + AC_MSG_NOTICE([Disabling Composite extension]) + COMPOSITE=no + fi +fi +AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false]) +AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) + dnl Darwin / OS X DDX if test "X$XQUARTZ" = Xauto; then AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[ @@ -2133,6 +2206,7 @@ hw/xgl/glx/module/Makefile hw/xgl/glxext/Makefile hw/xgl/glxext/module/Makefile hw/xnest/Makefile +hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/bundle/Makefile hw/xquartz/xpr/Makefile diff --git a/hw/Makefile.am b/hw/Makefile.am index 011a280ed..c2b9571b9 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -14,6 +14,10 @@ if XNEST XNEST_SUBDIRS = xnest endif +if XWIN +XWIN_SUBDIRS = xwin +endif + if XGL XGL_SUBDIRS = xgl endif @@ -33,6 +37,7 @@ endif SUBDIRS = \ $(XORG_SUBDIRS) \ $(XGL_SUBDIRS) \ + $(XWIN_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ @@ -40,7 +45,7 @@ SUBDIRS = \ $(XQUARTZ_SUBDIRS) \ $(XPRINT_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xquartz kdrive xgl xprint +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint relink: for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog new file mode 100644 index 000000000..aca2ffcb1 --- /dev/null +++ b/hw/xwin/ChangeLog @@ -0,0 +1,683 @@ +2006-03-03 Alan Hourihane + + * winprefs.c: (HandleCustomWM_COMMAND): + https://bugs.freedesktop.org/show_bug.cgi?id=4341 + Make Xming error messages more meaningful. + +2006-03-03 Alan Hourihane + + * winmultiwindowwndproc.c: (winTopLevelWindowProc): + * winwndproc.c: (winWindowProc): + https://bugs.freedesktop.org/show_bug.cgi?id=4538 + Fix mouse button release on multiwindows scrolling. + +2006-03-03 Alan Hourihane + + * winmultiwindowicons.c: (winXIconToHICON), (winUpdateIcon): + * winwin32rootlesswindow.c: (winMWExtWMUpdateIcon): + https://bugs.freedesktop.org/show_bug.cgi?id=5138 + Check for NULL pointer + +2005-07-05 Alexander Gottwald + + * winmultiwindowwm.c: + Fix crash on server shutdown + +2005-07-05 Alexander Gottwald + + * winkeybd.c: + * winkeybd.h: + * winwndproc.c: + Fix simultanious presses of Left and Right Control and Shift keys. + https://bugs.freedesktop.org/show_bug.cgi?id=3677 + +2005-07-05 Alexander Gottwald + + * winmultiwindowwm.c: + Fix typo which broke window titles + +2005-07-05 Alexander Gottwald + + * winmultiwindowwndproc.c: + * winkeybd.c: + Fix problem with fake Control press on Alt-Gr + https://bugs.freedesktop.org/show_bug.cgi?id=3680 + https://bugs.freedesktop.org/show_bug.cgi?id=3497 + + * InitOutput.c: + Fix static declaration of winGetBaseDir + +2005-07-05 Alexander Gottwald + + * winwindow.h: + * winmultiwindowwm.c: + * winscrinit.c: + External windowmanagers could connect in multiwindow mode which lead + to strange results with the internal windowmanager. + +2005-07-05 Alexander Gottwald + + * *.c: + Include xwin-config.h if HAVE_XWIN_CONFIG is defined + Cleanup X11 includes handling + Warning fixes + +2005-06-30 Alexander Gottwald + + * winmultiwindowwndproc.c: + Pass serverClient instead of NULL to ConfigureWindow. + This should fix a crash reported by Øyvind Harboe + +2005-06-08 Alexander Gottwald + + * winlayouts.h: + Merge from CYGWIN + Added layout "French (Canada)" as ca_enhanced + Added Czech (QWERTY) layout + * winshaddnl.c: + Merge from CYGWIN + Print error code if winStoreColorsShadowDDNL fails + +2005-06-08 Alexander Gottwald + + * winmultiwindowwindow.c: + Fix crash reported by Øyvind Harboe + +2005-06-03 Alexander Gottwald + + * winmultiwindowwndproc.c: + * winblock.c: + Backout last winRaiseWindow patch which caused stacking problems + +2005-05-25 Alexander Gottwald + + * win.h: + * winmultiwindowwm.c: + Workaround bug in pthread.h + +2005-05-08 Alexander Gottwald + + * winmultiwindowwndproc.c: + * winblock.c: + Only call ConfigureWindow from winRaiseWindow if the windows + message dispatch loop is running. + +2005-05-02 Alexander Gottwald + + * winerror.c: + Print correct logfile in FatalError message + +2005-04-19 Alexander Gottwald + + * winmultiwindowwndproc.c: + Prevent recursive calls to winRaiseWindow. + +2005-03-10 Alexander Gottwald + + * winmultiwindowwndproc.c: + Force rebuilding of window stack if a window changes it's state from + minimized. + +2005-03-07 Alexander Gottwald + + * winmultiwindowwndproc.c: + * winmultiwindowwindow.c: + Prevent winRaiseWindow from calling ConfigureWindow if the message + was sent from within winDestroyWindowsWindow + + DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing + a restacking of all windows, even of the window which is just about + to destroyed and whose structures may not be intact anymore. + +2005-02-24 Alexander Gottwald + + * winmultiwindowwndproc.c: + on WM_WINDOWPOSCHANGED raise window directly and in sync without + utilizing the async windowmanager thread. Fixes some restacking + problems occuring which were timing dependent + Do not raise the window on WM_ACTIVATE + Removed unused code for WM_WINDOWPOSCHANGING + ESC is debug key. Print status but do not abort processing the message + +2005-02-12 Alexander Gottwald + + * winmultiwindowwindow.c + * winmultiwindowwndproc.c + * winwin32rootlesswndproc.c: + Cleanup some message debugging + +2005-02-12 Alexander Gottwald + + * win.h + * winfont.c + * winmultiwindowshape.c + * winmultiwindowwindow.c + * winpfbdd.c + * winshaddd.c + * winshadddnl.c + * winshadgdi.c + * winwindow.c: + Fix incorrect wrapping of functions. Ensure the pointers from pScreen + point to the called function even if wrapped functions changed it + + * winmultiwindowwindow.c: + Set the window properties to NULL to avoid referencing freed memory + because of timing problems after deleting a window + + * winscrinit.c: + Do not wrap ChangeWindowAttributes. All functions are noops currently + +2005-02-12 Alexander Gottwald + + * winmsg.h: + * winmsg.c: + print window handle in message output + +2005-02-08 Alexander Gottwald + + * winkeybd.c: + * winkeynames.h: + Updated fix for ABNT2 and HK_Toggle keys. + +2005-02-08 Alexander Gottwald + + * winkeybd.h: + * winkeynames.h: + Backout ABNT2 and HK_Toggle fix since it broke keys F1 and F4. + +2005-02-07 Alexander Gottwald + + * winlayouts.h: + * winconfig.c: + Moved keyboard layout table to external file. + +2005-02-02 Alexander Gottwald + + * wincreatewnd.c: + Force ShowWindow if XWin was started via run.exe. Fixes mainwindow + not showing bug + +2005-01-31 Alexander Gottwald + + * winmultiwindowwindow.c + * winmultiwindowwndproc.c: + Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki) + +2005-01-31 Alexander Gottwald + + * winmultiwindowwndproc.c: + Fixes for window ordering problem (updated) (Kensuke Matsuzaki) + +2005-01-31 Alexander Gottwald + + * winconfig.c: + Added hungarian keyboard layout. + +2005-01-31 Alexander Gottwald + + * winmessages.h + * winmsg.h + * winmsg.c + * winmultiwindowwndproc.c + * winwin32rootlesswndproc.c + * winwndproc.c: + Make logging of messages configurable with environment variables + +2005-01-31 Alexander Gottwald + + * InitOutput.c: + resolve SHGetFolderPath dynamicly since it is not available on all Windows + systems. + +2005-01-12 Alexander Gottwald + + * winmsg.c + * winmsg.h: + Introduce function winTrace which prints log message with verbosity 10 + * winmultiwindowwindow.c: + Use winTrace for 3 heavily called functions + +2005-01-11 Alexander Gottwald + + * XWin.man: + Document the -silent-dup-error switch + +2005-01-11 Alexander Gottwald + + * winkeyhook.c: + Do not grab ALT-TAB when window is in multiwindow mode + +2005-01-11 Alexander Gottwald + + * winprefs.h: + Fix crash with not matching definitions of PATH_MAX + +2005-01-10 Alexander Gottwald + + * winkeybd.h + * winkeynames.h: + Adjust keysyms for Hiragana_Katakana toggle and backslash/underscore + on Japanese and ABNT2 keyboards + +2005-01-10 Alexander Gottwald + + * winkeybd.h + * winkeyhook.c + * winwndproc.c: + Make keyhook feature work in multiwindowmode too + Hook windows keys + +2005-01-08 Alexander Gottwald + + * winblock.c: + Fix a possible null-pointer dereference (Keishi Suenaga) + +2005-01-06 Alexander Gottwald + + * Imakefile + * InitOutput.c + * XWin.rc + * winerror.c + * wintrayicon.c + * winvideo.c + * winshaddd.c + * winwindow.h: + Set PROJECT_NAME in Imakefile to create alternative window titles + for Cygwin/X and Xming + +2005-01-06 Alexander Gottwald + + * winmultiwindowclass.c: + * winmultiwindowwm.c: + Fix crash with non-nullterminated strings (reported by Øyvind Harboe) + +2004-12-14 Alexander Gottwald + + * InitOutput.c: + * winprocarg.c: + EnumDisplayMonitors is not available on Window NT4 and 95. Resolve + the function dynamicly + +2004-12-08 Alexander Gottwald + + * InitOutput.c: + * winprocarg.c: + Added support for placing the main window with the @. + Patch by Mark Fisher, small changes by Alexander Gottwald + +2004-12-06 Alexander Gottwald + + * XWin.rc: + include windows.h + +2004-12-05 Alexander Gottwald + + * ddraw.h: + redone ddraw.h to be able to mix it with w32api style COM header + files. + + * winmultiwindowwm.c: + * obj_base.h: + * ddraw.h: + obj_base.h is not needed anymore. Using instead. + + * winms.h: + Use Xwindows.h instead of windows.h + + * winresource.h: + do not include win_ms.h + + * win.h: + remove extra definition of sleep() + + * InitOutput.c: + Set HOME to Documents and Settings/username if not set + + * winprefs.c: + Use Xming basedir instead of ProjectRoot for system.XWinrc + + * windialogs.c: + * winshadgdi.c: + * winprefs.c: + Fix callback functions to use wBOOL instead of BOOL + + * winmultiwindowwindow.c: + * winwin32rootless.c: + * winwin32rootlesswindow.c: + * winerror.c: + Fix compiler warnings. Added debug output. + + * winconfig.c: + Fix warning about undefined macro max + +2004-12-04 Earle Philhower + + * InitOutput.c: + * win.h: + * wincreatewnd.c: + * winprocarg.c: + Optional position -screen parameter (-screen n WxH+X+Y or + -screen n W H X Y) + +2004-12-03 Alexander Gottwald + + * windialogs.c: + * win.h: + * Imakefile: + * winerror.c: + Removed scprintf, aprintf and snprintf stuff and use newXprintf + +2004-12-02 Alexander Gottwald + + * winwin32rootless.c: + Adjust the width of the rootless backbuffer to match 32 bit alignment + + * winprocarg.c: + Make multiplemonitors default for -internalwm + +2004-12-01 Alexander Gottwald + + * InitOutput.c: + Set XERRORDB environment variable to relocate the XErrorDB file + +2004-11-29 Kensuke Matsuzaki + + * winmultiwindowwm.c: + Fixed windows.h include for cygwin. + + * winmultiwindowwindow.c: + Bugzilla #1945: Stop unnecessary reordering. + +2004-11-24 Alexander Gottwald + + * winmultiwindowwm.c: + Finally the multiwindow mode defines a default cursor + +2004-11-22 Alexander Gottwald + + * winmultiwindowwm.c: + Fixes for building multiwindow and internalwm on mingw + * winwin32rootless.c: + Changed some debugging output + +2004-11-22 Alexander Gottwald + + * InitOutput.c, winglobals.c, winprocarg.c: + Xming: Place logfile in users tempdir + +2004-11-15 Alexander Gottwald + + * Imakefile: + Remove override of HasSnprintf + +2004-11-15 Alexander Gottwald + + * Imakefile: + * InitInput.c: (InitInput): + * InitOutput.c: (winClipboardShutdown), (ddxGiveUp), + (winCheckMount), (winGetBaseDir), (winFixupPaths), (OsVendorInit), + (winCheckDisplayNumber): + * win.h: + * winblock.c: (winBlockHandler): + * winclipboard.h: + * winclipboardthread.c: (winClipboardProc): + * winclipboardwndproc.c: (winClipboardWindowProc): + * winconfig.c: (winConfigKeyboard), (winConfigFiles): + * wincreatewnd.c: (winCreateBoundingWindowWindowed): + * windialogs.c: (winDisplayExitDialog), (winExitDlgProc), + (winAboutDlgProc): + * winengine.c: (winSetEngine): + * winerror.c: (OsVendorVErrorF), (winMessageBoxF), (scprintf): + * winglobals.c: (winInitializeGlobals): + * winkeybd.c: (winKeybdReleaseKeys): + * winmultiwindowicons.c: + * winmultiwindowwindow.c: (winCreateWindowsWindow): + * winmultiwindowwm.c: + * winprefs.c: (ReloadPrefs), (HandleCustomWM_COMMAND): + * winprocarg.c: (ddxProcessArgument): + * winscrinit.c: (winFinishScreenInitFB): + * winshadddnl.c: + * wintrayicon.c: (winHandleIconMessage): + * winwakeup.c: (winWakeupHandler): + * winwin32rootless.c: (winMWExtWMCreateFrame): + * winwindow.c: (winReshapeRootless): + * winwindow.h: + * winwndproc.c: (winWindowProc): + Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 + Added mingw (Win32) port + +2004-11-11 Alexander Gottwald + + * winconfig.c: + added keyboard layout "French (Switzerland)" + +2004-11-06 Alexander Gottwald + + * winwndproc.c, wintrayicon.c, winscrinit.c: + * winmultiwindowwindow.c: + Wrap all mwextwm and internalwm code with XWIN_MULTIWINDOWEXTWM + +2004-11-04 Kensuke Matsuzaki + + * InitOutput.c: (winUseMsg): + * win.h: + * winmultiwindowwindow.c: (winMinimizeWindow): + * winmultiwindowwm.c: (PushMessage), (UpdateName), + (PreserveWin32Stack), (winMultiWindowWMProc), + (winMultiWindowXMsgProc), (winInitWM), (winInitMultiWindowWM), + (CheckAnotherWindowManager): + * winprocarg.c: (winInitializeDefaultScreens), + (ddxProcessArgument): + * winscrinit.c: (winFinishScreenInitFB): + * wintrayicon.c: (winHandleIconMessage): + * winwin32rootless.c: (InitWin32RootlessEngine), + (winMWExtWMResizeFrame), (winMWExtWMRestackFrame), + (winMWExtWMStartDrawing), (winMWExtWMRootlessSwitchWindow), + (winMWExtWMSetNativeProperty): + * winwin32rootlesswindow.c: (winMWExtWMReorderWindows), + (winMWExtWMDecorateWindow), (winMWExtWMUpdateWindowDecoration), + (winIsInternalWMRunning), (winMWExtWMRestackWindows): + * winwin32rootlesswndproc.c: (winMWExtWMWindowProc): + * winwindow.h: + * winwndproc.c: (winWindowProc): + Add internalwm mode. + +2004-10-28 Alexander Gottwald + + * win.h: + add fRetryCreateSurface + * winshaddnl.c (winBltExposedRegionsShadowDDNL): + try to recreate the primary surface if it was lost + * winshaddnl.c (winCreatePrimarySurfaceShadowDDNL): + mark screen to retry creating the primary surface if it failed + +2004-10-23 Alexander Gottwald + + * winconfig (winConfigFiles): + Simplify /etc/X11/font-dirs parsing + +2004-10-20 Alexander Gottwald + + * XWin.rc, winresource.h, winwndproc.c: + Add ShowCursor entry to tray menu + +2004-10-20 Alexander Gottwald + + * Imakefile: + Add ETCX11DIR to DEFINES + * InitOutput.c (InitOutput): + * winconfig.c (winConfigFiles) : + Add entries from /etc/X11/font-dirs to default fontpath + +2004-10-16 Alexander Gottwald + + * winprocarg.c (winInitializeDefaultScreens, ddxProcessArgument): + * win.h: + Make multiple monitors default for -multiwindow and -mwextwm. + Added a flag to indicate if the user has overridden the multimonitor + settings. (Øyvind Harboe, Alexander Gottwald) + +2004-10-07 Torrey Lyons + + * winscrinit.c: + Add compatibility with the generic rootless layer's new + DoReorderWindow function. + +2004-10-05 Alexander Gottwald + + * XWin.rc: + Set the dialogstyle to DS_CENTERMOUSE. Dialogs will now popup on the + monitor where the mouse is and not on the center of the whole desktop. + +2004-10-02 Alexander Gottwald + + * winmouse.c (winMouseProc): + Make sure buttons 1-3 are mouse buttons and wheel events are 4-5 + Document code + Replace ErrorF with appropriate winMsg + use a symbolic name for the wheel event offset + +2004-10-01 Alexander Gottwald + + * wincreatewnd.c (winCreateBoundingWindowWindowed): + Do not adjust workarea if native windowmanager is used + +2004-09-22 Kensuke Matsuzaki + + * winclipboardthread.c (winClipboardErrorHandler): + * winclipboardwndproc.c (winClipboardWindowProc): + * winclipboardxevents.c (winClipboardFlushXEvents): + Fix clipboard bug with unicode applications. + +2004-09-17 Torrey Lyons + + * winscrinit.c: (winFinishScreenInitFB): + Bugzilla #1032: Make rootless acceleration functions compatible with + Damage. + +2004-09-16 Alexander Gottwald + + * wincreatewnd.c (winCreateBoundingWindowWindowed): + Remove code which prevented the use from specifying the window + size in nodecoration mode. + +2004-08-26 Chris B + + * win.h, winmessages.h: + Add defines for WM_XBUTTON + * winmouse.c (winMouseProc): + Query number of mouse buttons from windows. + * winmultiwindowwndproc.c (winTopLevelWindowProc): + * winwin32rootlesswndproc.c (winMWExtWMWindowProc): + * winwndproc.c (winWindowProc): + Handle WM_XBUTTON messages. + +2004-08-02 Kensuke Matsuzaki + + * winclipboardthread.c winclipboardwndproc.c: + * winclipboardxevents.c winwin32rootlesswndproc.c: + Fix the bug that we can't copy & paste multi-byte string to + Unicode-base Windows application. Rename fUnicodeSupport to + fUseUnicode, because it don't mean wheather Windows support + Unicode or not. + +2004-07-31 Alexander Gottwald + + * win.h: + adjust prototype for winInitCmapPrivates to match Egberts change. + +2004-07-30 Egbert Eich + + * winallpriv.c: (winInitCmapPrivates): + test if colormap with index really exists in the list of + installed maps before using it. + +2004-07-09 Alexander Gottwald + + * winconfig.c: Add entry for irish layout (ie) + * InitOutput.c, winerror.c, winglobals.c: rename g_fUseMsg to + g_fSilentFatalError + * InitOutput.c, winglobals.c, winprocarg.c: added commandline option + -silent-dup-error to allow silent termination if another instance of + XWin was found running + +2004-06-27 Alexander Gottwald + + * winconfig.c: Add entry for us layout. This changes not much but + removes a strange error message about the unknown us layout. + +2004-06-24 Alexander Gottwald + + * InitOutput.c: Check for textmode mounted /tmp and print a warning + +2004-06-15 Harold Hunt + + * windialogs.c: Fix path to locally installed changelog for the About + dialog box. + +2004-05-27 Alexander Gottwald + + * winpriv.c: Create win32 window if not already created + * winmultiwindowwindow.c: Export winCreateWindowWindow + +2004-05-27 Alexander Gottwald + + * win.h: Allow CYGDEBUG to defined in the Makefile + * winwindow.h: Allow CYGWINDOWING_DEBUG to defined in the Makefile + +2004-05-19 Alexander Gottwald + + * winmultiwindowicons.c (winInitGlobalIcons): Load the small default + icon too + * winprefs.h, winprefs.c (winOverrideDefaultIcon): Takes the iconsize + as parameter + +2004-05-19 Alexander Gottwald + + * win.h, winmultiwindowicons.c (winXIconToHICON): Takes iconsize + as parameter + * winglobals.c, winmultiwindowicons.c: Rename g_hiconX to g_hIconX. + Added new variable g_hSmallIconX for 16x16 icon. + * winwindow.h, winmultiwindowicons.c (winInitGlobalIcons): Inits the + global g_hIconX handles. + * winwindow.h, winmultiwindowicons.c (winDestroyIcon): Free the icon + without messing with the global icon handle. + * winmultiwindowicons.c (winSelectIcons): Generate a custom icon from + window settigns or set them to globals. + * winmultiwindowshape.c, winmultiwindowwindow.c, winwin32rootless.c, + winwin32rootlesswindow.c, winwin32rootlesswndproc.c: Remove + declaration of g_hiconX; + * winmultiwindowwindow.c (winCreateWindowsWindow), + winwin32rootless.c (winMWExtWMCreateFrame): Use winSelectIcons + to get the window icons. Set the small icon too. + * winmultiwindowwindow.c (winDestroyWindowsWindow), + winmultiwindowicons.c (winUpdateIcon), + winprefs.c (ReloadEnumWindowsProc), + winwin32rootlesswindow.c (winMWExtWMUpdateIcon), + winwin32rootless.c (winMWExtWMDestroyFrame): Use winDestroyIcon + to free the icon without destroying the global icon. + +2004-05-17 Alexander Gottwald + + * windialogs.c (winExitDlgProc, winAboutDlgProc), + winmultiwindowwndproc.c (winTopLevelWindowProc), + winwndproc.c (winWindowProc): Check if g_fSoftwareCursor is set + before calling ShowCursor. + +2004-05-09 Dan Wilks + + * winclipboard.h: Add extern prototypes for winDebug, winErrorFVerb + copied from winmsg.h. + * winclipboardinit.c (winFixClipboardChain): Post rather than send the + reinit message to the clipboard window. Sending the message caused, + or possibly just exacerbated an existing, race condition that would + cause the X server to hang when coming back from a remote desktop + session. + * winclipboardwndproc.c (winProcessXEventsTimeout): switch to new + logging api's. + * winclipboardwindproc.c (winClipboardWindowProc): switch to new + logging api's. Add some additional debug logging. Make best effort + to prevent our window appearing twice in the clipboard chain. Also + detect loops when they occur and try to behave in a reasonable way. + +# vim:ts=8:noexpandtab:encoding=utf8 diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c new file mode 100644 index 000000000..6a850cd44 --- /dev/null +++ b/hw/xwin/InitInput.c @@ -0,0 +1,177 @@ +/* + + Copyright 1993, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. + +*/ + +#ifdef HAVE_XWIN_CONFIG_H +#include +#endif +#include "win.h" +#ifdef XWIN_CLIPBOARD +# include "../../Xext/xf86miscproc.h" +#endif +#include "dixstruct.h" + + +/* + * Local function prototypes + */ + +#ifdef XWIN_CLIPBOARD +DISPATCH_PROC(winProcEstablishConnection); +DISPATCH_PROC(winProcQueryTree); +DISPATCH_PROC(winProcSetSelectionOwner); +#endif + + +/* + * Local global declarations + */ + +CARD32 g_c32LastInputEventTime = 0; + + +/* + * References to external symbols + */ + +#ifdef HAS_DEVWINDOWS +extern int g_fdMessageQueue; +#endif +extern Bool g_fXdmcpEnabled; +#ifdef XWIN_CLIPBOARD +extern winDispatchProcPtr winProcEstablishConnectionOrig; +extern winDispatchProcPtr winProcQueryTreeOrig; +#endif + + +/* Called from dix/devices.c */ +/* + * All of our keys generate up and down transition notifications, + * so all of our keys can be used as modifiers. + * + * An example of a modifier is mapping the A key to the Control key. + * A has to be a legal modifier. I think. + */ + +Bool +LegalModifier (unsigned int uiKey, DeviceIntPtr pDevice) +{ + return TRUE; +} + + +/* Called from dix/dispatch.c */ +/* + * Run through the Windows message queue(s) one more time. + * Tell mi to dequeue the events that we have sent it. + */ +void +ProcessInputEvents (void) +{ +#if 0 + ErrorF ("ProcessInputEvents\n"); +#endif + + mieqProcessInputEvents (); + miPointerUpdate (); + +#if 0 + ErrorF ("ProcessInputEvents - returning\n"); +#endif +} + + +int +TimeSinceLastInputEvent () +{ + if (g_c32LastInputEventTime == 0) + g_c32LastInputEventTime = GetTickCount (); + return GetTickCount () - g_c32LastInputEventTime; +} + + +/* See Porting Layer Definition - p. 17 */ +void +InitInput (int argc, char *argv[]) +{ + DeviceIntPtr pMouse, pKeyboard; + +#if CYGDEBUG + winDebug ("InitInput\n"); +#endif + +#ifdef XWIN_CLIPBOARD + /* + * Wrap some functions at every generation of the server. + */ + if (InitialVector[2] != winProcEstablishConnection) + { + winProcEstablishConnectionOrig = InitialVector[2]; + InitialVector[2] = winProcEstablishConnection; + } + if (g_fXdmcpEnabled + && ProcVector[X_QueryTree] != winProcQueryTree) + { + winProcQueryTreeOrig = ProcVector[X_QueryTree]; + ProcVector[X_QueryTree] = winProcQueryTree; + } +#endif + + pMouse = AddInputDevice (winMouseProc, TRUE); + pKeyboard = AddInputDevice (winKeybdProc, TRUE); + + RegisterPointerDevice (pMouse); + RegisterKeyboardDevice (pKeyboard); + + miRegisterPointerDevice (screenInfo.screens[0], pMouse); + mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse); + + /* Initialize the mode key states */ + winInitializeModeKeyStates (); + +#ifdef HAS_DEVWINDOWS + /* Only open the windows message queue device once */ + if (g_fdMessageQueue == WIN_FD_INVALID) + { + /* Open a file descriptor for the Windows message queue */ + g_fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY); + + if (g_fdMessageQueue == -1) + { + FatalError ("InitInput - Failed opening %s\n", + WIN_MSG_QUEUE_FNAME); + } + + /* Add the message queue as a device to wait for in WaitForSomething */ + AddEnabledDevice (g_fdMessageQueue); + } +#endif + +#if CYGDEBUG + winDebug ("InitInput - returning\n"); +#endif +} diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c new file mode 100644 index 000000000..d2159813c --- /dev/null +++ b/hw/xwin/InitOutput.c @@ -0,0 +1,1144 @@ +/* + +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifdef HAVE_XWIN_CONFIG_H +#include +#endif +#include "win.h" +#include "winmsg.h" +#include "winconfig.h" +#include "winprefs.h" +#ifdef XWIN_CLIPBOARD +#include "X11/Xlocale.h" +#endif +#ifdef DPMSExtension +#include "dpmsproc.h" +#endif +#ifdef __CYGWIN__ +#include +#endif +#if defined(XKB) && defined(WIN32) +#include +#endif +#ifdef RELOCATE_PROJECTROOT +#include +typedef HRESULT (*SHGETFOLDERPATHPROC)( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwFlags, + LPTSTR pszPath +); +#endif + + +/* + * References to external symbols + */ + +extern int g_iNumScreens; +extern winScreenInfo g_ScreenInfo[]; +extern int g_iLastScreen; +extern char * g_pszCommandLine; +extern Bool g_fSilentFatalError; + +extern char * g_pszLogFile; +extern Bool g_fLogFileChanged; +extern int g_iLogVerbose; +Bool g_fLogInited; + +extern Bool g_fXdmcpEnabled; +#ifdef HAS_DEVWINDOWS +extern int g_fdMessageQueue; +#endif +extern const char * g_pszQueryHost; +extern HINSTANCE g_hInstance; + +#ifdef XWIN_CLIPBOARD +extern Bool g_fUnicodeClipboard; +extern Bool g_fClipboardLaunched; +extern Bool g_fClipboardStarted; +extern pthread_t g_ptClipboardProc; +extern HWND g_hwndClipboard; +extern Bool g_fClipboard; +#endif + +extern HMODULE g_hmodDirectDraw; +extern FARPROC g_fpDirectDrawCreate; +extern FARPROC g_fpDirectDrawCreateClipper; + +extern HMODULE g_hmodCommonControls; +extern FARPROC g_fpTrackMouseEvent; +extern Bool g_fNoHelpMessageBox; +extern Bool g_fSilentDupError; + + +/* + * Function prototypes + */ + +#ifdef XWIN_CLIPBOARD +static void +winClipboardShutdown (void); +#endif + +#if defined(DDXOSVERRORF) +void +OsVendorVErrorF (const char *pszFormat, va_list va_args); +#endif + +void +winInitializeDefaultScreens (void); + +static Bool +winCheckDisplayNumber (void); + +void +winLogCommandLine (int argc, char *argv[]); + +void +winLogVersionInfo (void); + +Bool +winValidateArgs (void); + +#ifdef RELOCATE_PROJECTROOT +const char * +winGetBaseDir(void); +#endif + +/* + * For the depth 24 pixmap we default to 32 bits per pixel, but + * we change this pixmap format later if we detect that the display + * is going to be running at 24 bits per pixel. + * + * FIXME: On second thought, don't DIBs only support 32 bits per pixel? + * DIBs are the underlying bitmap used for DirectDraw surfaces, so it + * seems that all pixmap formats with depth 24 would be 32 bits per pixel. + * Confirm whether depth 24 DIBs can have 24 bits per pixel, then remove/keep + * the bits per pixel adjustment and update this comment to reflect the + * situation. Harold Hunt - 2002/07/02 + */ + +static PixmapFormatRec g_PixmapFormats[] = { + { 1, 1, BITMAP_SCANLINE_PAD }, + { 4, 8, BITMAP_SCANLINE_PAD }, + { 8, 8, BITMAP_SCANLINE_PAD }, + { 15, 16, BITMAP_SCANLINE_PAD }, + { 16, 16, BITMAP_SCANLINE_PAD }, + { 24, 32, BITMAP_SCANLINE_PAD }, +#ifdef RENDER + { 32, 32, BITMAP_SCANLINE_PAD } +#endif +}; + +const int NUMFORMATS = sizeof (g_PixmapFormats) / sizeof (g_PixmapFormats[0]); + +#ifdef XWIN_CLIPBOARD +static void +winClipboardShutdown (void) +{ + /* Close down clipboard resources */ + if (g_fClipboard && g_fClipboardLaunched && g_fClipboardStarted) + { + /* Synchronously destroy the clipboard window */ + if (g_hwndClipboard != NULL) + { + SendMessage (g_hwndClipboard, WM_DESTROY, 0, 0); + /* NOTE: g_hwndClipboard is set to NULL in winclipboardthread.c */ + } + else + return; + + /* Wait for the clipboard thread to exit */ + pthread_join (g_ptClipboardProc, NULL); + + g_fClipboardLaunched = FALSE; + g_fClipboardStarted = FALSE; + + winDebug ("winClipboardShutdown - Clipboard thread has exited.\n"); + } +} +#endif + + +#if defined(DDXBEFORERESET) +/* + * Called right before KillAllClients when the server is going to reset, + * allows us to shutdown our seperate threads cleanly. + */ + +void +ddxBeforeReset (void) +{ + winDebug ("ddxBeforeReset - Hello\n"); + +#ifdef XWIN_CLIPBOARD + winClipboardShutdown (); +#endif +} +#endif + + +/* See Porting Layer Definition - p. 57 */ +void +ddxGiveUp (void) +{ + int i; + +#if CYGDEBUG + winDebug ("ddxGiveUp\n"); +#endif + + /* Perform per-screen deinitialization */ + for (i = 0; i < g_iNumScreens; ++i) + { + /* Delete the tray icon */ + if (!g_ScreenInfo[i].fNoTrayIcon && g_ScreenInfo[i].pScreen) + winDeleteNotifyIcon (winGetScreenPriv (g_ScreenInfo[i].pScreen)); + } + +#ifdef XWIN_MULTIWINDOW + /* Notify the worker threads we're exiting */ + winDeinitMultiWindowWM (); +#endif + +#ifdef HAS_DEVWINDOWS + /* Close our handle to our message queue */ + if (g_fdMessageQueue != WIN_FD_INVALID) + { + /* Close /dev/windows */ + close (g_fdMessageQueue); + + /* Set the file handle to invalid */ + g_fdMessageQueue = WIN_FD_INVALID; + } +#endif + + if (!g_fLogInited) { + LogInit (g_pszLogFile, NULL); + g_fLogInited = TRUE; + } + LogClose (); + + /* + * At this point we aren't creating any new screens, so + * we are guaranteed to not need the DirectDraw functions. + */ + if (g_hmodDirectDraw != NULL) + { + FreeLibrary (g_hmodDirectDraw); + g_hmodDirectDraw = NULL; + g_fpDirectDrawCreate = NULL; + g_fpDirectDrawCreateClipper = NULL; + } + + /* Unload our TrackMouseEvent funtion pointer */ + if (g_hmodCommonControls != NULL) + { + FreeLibrary (g_hmodCommonControls); + g_hmodCommonControls = NULL; + g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA; + } + + /* Free concatenated command line */ + if (g_pszCommandLine) + { + free (g_pszCommandLine); + g_pszCommandLine = NULL; + } + + /* Remove our keyboard hook if it is installed */ + winRemoveKeyboardHookLL (); + + /* Tell Windows that we want to end the app */ + PostQuitMessage (0); +} + + +/* See Porting Layer Definition - p. 57 */ +void +AbortDDX (void) +{ +#if CYGDEBUG + winDebug ("AbortDDX\n"); +#endif + ddxGiveUp (); +} + +#ifdef __CYGWIN__ +/* hasmntopt is currently not implemented for cygwin */ +static const char *winCheckMntOpt(const struct mntent *mnt, const char *opt) +{ + const char *s; + size_t len; + if (mnt == NULL) + return NULL; + if (opt == NULL) + return NULL; + if (mnt->mnt_opts == NULL) + return NULL; + + len = strlen(opt); + s = strstr(mnt->mnt_opts, opt); + if (s == NULL) + return NULL; + if ((s == mnt->mnt_opts || *(s-1) == ',') && (s[len] == 0 || s[len] == ',')) + return (char *)opt; + return NULL; +} + +static void +winCheckMount(void) +{ + FILE *mnt; + struct mntent *ent; + + enum { none = 0, sys_root, user_root, sys_tmp, user_tmp } + level = none, curlevel; + BOOL binary = TRUE; + + mnt = setmntent("/etc/mtab", "r"); + if (mnt == NULL) + { + ErrorF("setmntent failed"); + return; + } + + while ((ent = getmntent(mnt)) != NULL) + { + BOOL system = (strcmp(ent->mnt_type, "system") == 0); + BOOL root = (strcmp(ent->mnt_dir, "/") == 0); + BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0); + + if (system) + { + if (root) + curlevel = sys_root; + else if (tmp) + curlevel = sys_tmp; + else + continue; + } + else + { + if (root) + curlevel = user_root; + else if (tmp) + curlevel = user_tmp; + else + continue; + } + + if (curlevel <= level) + continue; + level = curlevel; + + if (winCheckMntOpt(ent, "binmode") == NULL) + binary = 0; + else + binary = 1; + } + + if (endmntent(mnt) != 1) + { + ErrorF("endmntent failed"); + return; + } + + if (!binary) + winMsg(X_WARNING, "/tmp mounted int textmode\n"); +} +#else +static void +winCheckMount(void) +{ +} +#endif + +#ifdef RELOCATE_PROJECTROOT +const char * +winGetBaseDir(void) +{ + static BOOL inited = FALSE; + static char buffer[MAX_PATH]; + if (!inited) + { + char *fendptr; + HMODULE module = GetModuleHandle(NULL); + DWORD size = GetModuleFileName(module, buffer, sizeof(buffer)); + if (sizeof(buffer) > 0) + buffer[sizeof(buffer)-1] = 0; + + fendptr = buffer + size; + while (fendptr > buffer) + { + if (*fendptr == '\\' || *fendptr == '/') + { + *fendptr = 0; + break; + } + fendptr--; + } + inited = TRUE; + } + return buffer; +} +#endif + +static void +winFixupPaths (void) +{ + BOOL changed_fontpath = FALSE; + MessageType font_from = X_DEFAULT; +#ifdef RELOCATE_PROJECTROOT + const char *basedir = winGetBaseDir(); + size_t basedirlen = strlen(basedir); +#endif + +#ifdef READ_FONTDIRS + { + /* Open fontpath configuration file */ + FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt"); + if (fontdirs != NULL) + { + char buffer[256]; + int needs_sep = TRUE; + int comment_block = FALSE; + + /* get defautl fontpath */ + char *fontpath = xstrdup(defaultFontPath); + size_t size = strlen(fontpath); + + /* read all lines */ + while (!feof(fontdirs)) + { + size_t blen; + char *hashchar; + char *str; + int has_eol = FALSE; + + /* read one line */ + str = fgets(buffer, sizeof(buffer), fontdirs); + if (str == NULL) /* stop on error or eof */ + break; + + if (strchr(str, '\n') != NULL) + has_eol = TRUE; + + /* check if block is continued comment */ + if (comment_block) + { + /* ignore all input */ + *str = 0; + blen = 0; + if (has_eol) /* check if line ended in this block */ + comment_block = FALSE; + } + else + { + /* find comment character. ignore all trailing input */ + hashchar = strchr(str, '#'); + if (hashchar != NULL) + { + *hashchar = 0; + if (!has_eol) /* mark next block as continued comment */ + comment_block = TRUE; + } + } + + /* strip whitespaces from beginning */ + while (*str == ' ' || *str == '\t') + str++; + + /* get size, strip whitespaces from end */ + blen = strlen(str); + while (blen > 0 && (str[blen-1] == ' ' || + str[blen-1] == '\t' || str[blen-1] == '\n')) + { + str[--blen] = 0; + } + + /* still something left to add? */ + if (blen > 0) + { + size_t newsize = size + blen; + /* reserve one character more for ',' */ + if (needs_sep) + newsize++; + + /* allocate memory */ + if (fontpath == NULL) + fontpath = malloc(newsize+1); + else + fontpath = realloc(fontpath, newsize+1); + + /* add separator */ + if (needs_sep) + { + fontpath[size] = ','; + size++; + needs_sep = FALSE; + } + + /* mark next line as new entry */ + if (has_eol) + needs_sep = TRUE; + + /* add block */ + strncpy(fontpath + size, str, blen); + fontpath[newsize] = 0; + size = newsize; + } + } + + /* cleanup */ + fclose(fontdirs); + defaultFontPath = xstrdup(fontpath); + free(fontpath); + changed_fontpath = TRUE; + font_from = X_CONFIG; + } + } +#endif /* READ_FONTDIRS */ +#ifdef RELOCATE_PROJECTROOT + { + const char *libx11dir = PROJECTROOT "/lib/X11"; + size_t libx11dir_len = strlen(libx11dir); + char *newfp = NULL; + size_t newfp_len = 0; + const char *endptr, *ptr, *oldptr = defaultFontPath; + + endptr = oldptr + strlen(oldptr); + ptr = strchr(oldptr, ','); + if (ptr == NULL) + ptr = endptr; + while (ptr != NULL) + { + size_t oldfp_len = (ptr - oldptr); + size_t newsize = oldfp_len; + char *newpath = malloc(newsize + 1); + strncpy(newpath, oldptr, newsize); + newpath[newsize] = 0; + + + if (strncmp(libx11dir, newpath, libx11dir_len) == 0) + { + char *compose; + newsize = newsize - libx11dir_len + basedirlen; + compose = malloc(newsize + 1); + strcpy(compose, basedir); + strncat(compose, newpath + libx11dir_len, newsize - basedirlen); + compose[newsize] = 0; + free(newpath); + newpath = compose; + } + + oldfp_len = newfp_len; + if (oldfp_len > 0) + newfp_len ++; /* space for separator */ + newfp_len += newsize; + + if (newfp == NULL) + newfp = malloc(newfp_len + 1); + else + newfp = realloc(newfp, newfp_len + 1); + + if (oldfp_len > 0) + { + strcpy(newfp + oldfp_len, ","); + oldfp_len++; + } + strcpy(newfp + oldfp_len, newpath); + + free(newpath); + + if (*ptr == 0) + { + oldptr = ptr; + ptr = NULL; + } else + { + oldptr = ptr + 1; + ptr = strchr(oldptr, ','); + if (ptr == NULL) + ptr = endptr; + } + } + + defaultFontPath = xstrdup(newfp); + free(newfp); + changed_fontpath = TRUE; + } +#endif /* RELOCATE_PROJECTROOT */ + if (changed_fontpath) + winMsg (font_from, "FontPath set to \"%s\"\n", defaultFontPath); + +#ifdef RELOCATE_PROJECTROOT + if (getenv("XKEYSYMDB") == NULL) + { + char buffer[MAX_PATH]; + snprintf(buffer, sizeof(buffer), "XKEYSYMDB=%s\\XKeysymDB", + basedir); + buffer[sizeof(buffer)-1] = 0; + putenv(buffer); + } + if (getenv("XERRORDB") == NULL) + { + char buffer[MAX_PATH]; + snprintf(buffer, sizeof(buffer), "XERRORDB=%s\\XErrorDB", + basedir); + buffer[sizeof(buffer)-1] = 0; + putenv(buffer); + } + if (getenv("XLOCALEDIR") == NULL) + { + char buffer[MAX_PATH]; + snprintf(buffer, sizeof(buffer), "XLOCALEDIR=%s\\locale", + basedir); + buffer[sizeof(buffer)-1] = 0; + putenv(buffer); + } + if (getenv("HOME") == NULL) + { + HMODULE shfolder; + SHGETFOLDERPATHPROC shgetfolderpath = NULL; + char buffer[MAX_PATH + 5]; + strncpy(buffer, "HOME=", 5); + + /* Try to load SHGetFolderPath from shfolder.dll and shell32.dll */ + + shfolder = LoadLibrary("shfolder.dll"); + /* fallback to shell32.dll */ + if (shfolder == NULL) + shfolder = LoadLibrary("shell32.dll"); + + /* resolve SHGetFolderPath */ + if (shfolder != NULL) + shgetfolderpath = (SHGETFOLDERPATHPROC)GetProcAddress(shfolder, "SHGetFolderPathA"); + + /* query appdata directory */ + if (shgetfolderpath && + shgetfolderpath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, + buffer + 5) == 0) + { + putenv(buffer); + } else + { + winMsg (X_ERROR, "Can not determine HOME directory\n"); + } + if (shfolder != NULL) + FreeLibrary(shfolder); + } + if (!g_fLogFileChanged) { + static char buffer[MAX_PATH]; + DWORD size = GetTempPath(sizeof(buffer), buffer); + if (size && size < sizeof(buffer)) + { + snprintf(buffer + size, sizeof(buffer) - size, + "XWin.%s.log", display); + buffer[sizeof(buffer)-1] = 0; + g_pszLogFile = buffer; + winMsg (X_DEFAULT, "Logfile set to \"%s\"\n", g_pszLogFile); + } + } +#ifdef XKB + { + static char xkbbasedir[MAX_PATH]; + + snprintf(xkbbasedir, sizeof(xkbbasedir), "%s\\xkb", basedir); + if (sizeof(xkbbasedir) > 0) + xkbbasedir[sizeof(xkbbasedir)-1] = 0; + XkbBaseDirectory = xkbbasedir; + XkbBinDirectory = basedir; + } +#endif /* XKB */ +#endif /* RELOCATE_PROJECTROOT */ +} + +void +OsVendorInit (void) +{ + /* Re-initialize global variables on server reset */ + winInitializeGlobals (); + + LogInit (NULL, NULL); + LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose); + + winFixupPaths(); + +#ifdef DDXOSVERRORF + if (!OsVendorVErrorFProc) + OsVendorVErrorFProc = OsVendorVErrorF; +#endif + + if (!g_fLogInited) { + /* keep this order. If LogInit fails it calls Abort which then calls + * ddxGiveUp where LogInit is called again and creates an infinite + * recursion. If we set g_fLogInited to TRUE before the init we + * avoid the second call + */ + g_fLogInited = TRUE; + LogInit (g_pszLogFile, NULL); + } + LogSetParameter (XLOG_FLUSH, 1); + LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose); + LogSetParameter (XLOG_FILE_VERBOSITY, 1); + + /* Log the version information */ + if (serverGeneration == 1) + winLogVersionInfo (); + + winCheckMount(); + + /* Add a default screen if no screens were specified */ + if (g_iNumScreens == 0) + { + winDebug ("OsVendorInit - Creating bogus screen 0\n"); + + /* + * We need to initialize default screens if no arguments + * were processed. Otherwise, the default screens would + * already have been initialized by ddxProcessArgument (). + */ + winInitializeDefaultScreens (); + + /* + * Add a screen 0 using the defaults set by + * winInitializeDefaultScreens () and any additional parameters + * processed by ddxProcessArgument (). + */ + g_iNumScreens = 1; + g_iLastScreen = 0; + + /* We have to flag this as an explicit screen, even though it isn't */ + g_ScreenInfo[0].fExplicitScreen = TRUE; + } +} + + +static void +winUseMsg (void) +{ + ErrorF ("-depth bits_per_pixel\n" + "\tSpecify an optional bitdepth to use in fullscreen mode\n" + "\twith a DirectDraw engine.\n"); + + ErrorF ("-emulate3buttons [timeout]\n" + "\tEmulate 3 button mouse with an optional timeout in\n" + "\tmilliseconds.\n"); + + ErrorF ("-engine engine_type_id\n" + "\tOverride the server's automatically selected engine type:\n" + "\t\t1 - Shadow GDI\n" + "\t\t2 - Shadow DirectDraw\n" + "\t\t4 - Shadow DirectDraw4 Non-Locking\n" +#ifdef XWIN_NATIVEGDI + "\t\t16 - Native GDI - experimental\n" +#endif + ); + + ErrorF ("-fullscreen\n" + "\tRun the server in fullscreen mode.\n"); + + ErrorF ("-refresh rate_in_Hz\n" + "\tSpecify an optional refresh rate to use in fullscreen mode\n" + "\twith a DirectDraw engine.\n"); + + ErrorF ("-screen scr_num [width height [x y] | [[WxH[+X+Y]][@m]] ]\n" + "\tEnable screen scr_num and optionally specify a width and\n" + "\theight and initial position for that screen. Additionally\n" + "\ta monitor number can be specified to start the server on,\n" + "\tat which point, all coordinates become relative to that\n" + "\tmonitor (Not for Windows NT4 and 95). Examples:\n" + "\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n" + "\t -screen 0 1024x768@3 ; 3rd monitor size 1024x768\n" + "\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n"); + + ErrorF ("-lesspointer\n" + "\tHide the windows mouse pointer when it is over an inactive\n" + "\t" PROJECT_NAME " window. This prevents ghost cursors appearing where\n" + "\tthe Windows cursor is drawn overtop of the X cursor\n"); + + ErrorF ("-nodecoration\n" + "\tDo not draw a window border, title bar, etc. Windowed\n" + "\tmode only.\n"); + +#ifdef XWIN_MULTIWINDOWEXTWM + ErrorF ("-mwextwm\n" + "\tRun the server in multi-window external window manager mode.\n"); + + ErrorF ("-internalwm\n" + "\tRun the internal window manager.\n"); +#endif + + ErrorF ("-rootless\n" + "\tRun the server in rootless mode.\n"); + +#ifdef XWIN_MULTIWINDOW + ErrorF ("-multiwindow\n" + "\tRun the server in multi-window mode.\n"); +#endif + + ErrorF ("-multiplemonitors\n" + "\tEXPERIMENTAL: Use the entire virtual screen if multiple\n" + "\tmonitors are present.\n"); + +#ifdef XWIN_CLIPBOARD + ErrorF ("-clipboard\n" + "\tRun the clipboard integration module.\n" + "\tDo not use at the same time as 'xwinclip'.\n"); + + ErrorF ("-nounicodeclipboard\n" + "\tDo not use Unicode clipboard even if NT-based platform.\n"); +#endif + + ErrorF ("-scrollbars\n" + "\tIn windowed mode, allow screens bigger than the Windows desktop.\n" + "\tMoreover, if the window has decorations, one can now resize\n" + "\tit.\n"); + + ErrorF ("-[no]trayicon\n" + "\tDo not create a tray icon. Default is to create one\n" + "\ticon per screen. You can globally disable tray icons with\n" + "\t-notrayicon, then enable it for specific screens with\n" + "\t-trayicon for those screens.\n"); + + ErrorF ("-clipupdates num_boxes\n" + "\tUse a clipping region to constrain shadow update blits to\n" + "\tthe updated region when num_boxes, or more, are in the\n" + "\tupdated region. Currently supported only by `-engine 1'.\n"); + +#ifdef XWIN_EMULATEPSEUDO + ErrorF ("-emulatepseudo\n" + "\tCreate a depth 8 PseudoColor visual when running in\n" + "\tdepths 15, 16, 24, or 32, collectively known as TrueColor\n" + "\tdepths. The PseudoColor visual does not have correct colors,\n" + "\tand it may crash, but it at least allows you to run your\n" + "\tapplication in TrueColor modes.\n"); +#endif + + ErrorF ("-[no]unixkill\n" + "\tCtrl+Alt+Backspace exits the X Server.\n"); + + ErrorF ("-[no]winkill\n" + "\tAlt+F4 exits the X Server.\n"); + +#ifdef XWIN_XF86CONFIG + ErrorF ("-config\n" + "\tSpecify a configuration file.\n"); + + ErrorF ("-keyboard\n" + "\tSpecify a keyboard device from the configuration file.\n"); +#endif + +#ifdef XKB + ErrorF ("-xkbrules XKBRules\n" + "\tEquivalent to XKBRules in XF86Config files.\n"); + + ErrorF ("-xkbmodel XKBModel\n" + "\tEquivalent to XKBModel in XF86Config files.\n"); + + ErrorF ("-xkblayout XKBLayout\n" + "\tEquivalent to XKBLayout in XF86Config files.\n" + "\tFor example: -xkblayout de\n"); + + ErrorF ("-xkbvariant XKBVariant\n" + "\tEquivalent to XKBVariant in XF86Config files.\n" + "\tFor example: -xkbvariant nodeadkeys\n"); + + ErrorF ("-xkboptions XKBOptions\n" + "\tEquivalent to XKBOptions in XF86Config files.\n"); +#endif + + ErrorF ("-logfile filename\n" + "\tWrite logmessages to instead of /tmp/Xwin.log.\n"); + + ErrorF ("-logverbose verbosity\n" + "\tSet the verbosity of logmessages. [NOTE: Only a few messages\n" + "\trespect the settings yet]\n" + "\t\t0 - only print fatal error.\n" + "\t\t1 - print additional configuration information.\n" + "\t\t2 - print additional runtime information [default].\n" + "\t\t3 - print debugging and tracing information.\n"); + + ErrorF ("-[no]keyhook\n" + "\tGrab special windows key combinations like Alt-Tab or the Menu " + "key.\n These keys are discarded by default.\n"); + + ErrorF ("-swcursor\n" + "\tDisable the usage of the windows cursor and use the X11 software " + "cursor instead\n"); +} + +/* See Porting Layer Definition - p. 57 */ +void +ddxUseMsg(void) +{ + /* Set a flag so that FatalError won't give duplicate warning message */ + g_fSilentFatalError = TRUE; + + winUseMsg(); + + /* Log file will not be opened for UseMsg unless we open it now */ + if (!g_fLogInited) { + LogInit (g_pszLogFile, NULL); + g_fLogInited = TRUE; + } + LogClose (); + + /* Notify user where UseMsg text can be found.*/ + if (!g_fNoHelpMessageBox) + winMessageBoxF ("The " PROJECT_NAME " help text has been printed to " + "/tmp/XWin.log.\n" + "Please open /tmp/XWin.log to read the help text.\n", + MB_ICONINFORMATION); +} + +/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ +void ddxInitGlobals(void) +{ +} + +/* See Porting Layer Definition - p. 20 */ +/* + * Do any global initialization, then initialize each screen. + * + * NOTE: We use ddxProcessArgument, so we don't need to touch argc and argv + */ + +void +InitOutput (ScreenInfo *screenInfo, int argc, char *argv[]) +{ + int i; + + /* Log the command line */ + winLogCommandLine (argc, argv); + +#if CYGDEBUG + winDebug ("InitOutput\n"); +#endif + + /* Validate command-line arguments */ + if (serverGeneration == 1 && !winValidateArgs ()) + { + FatalError ("InitOutput - Invalid command-line arguments found. " + "Exiting.\n"); + } + + /* Check for duplicate invocation on same display number.*/ + if (serverGeneration == 1 && !winCheckDisplayNumber ()) + { + if (g_fSilentDupError) + g_fSilentFatalError = TRUE; + FatalError ("InitOutput - Duplicate invocation on display " + "number: %s. Exiting.\n", display); + } + +#ifdef XWIN_XF86CONFIG + /* Try to read the xorg.conf-style configuration file */ + if (!winReadConfigfile ()) + winErrorFVerb (1, "InitOutput - Error reading config file\n"); +#else + winMsg(X_INFO, "XF86Config is not supported\n"); + winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html " + "for more information\n"); + winConfigFiles (); +#endif + + /* Load preferences from XWinrc file */ + LoadPreferences(); + + /* Setup global screen info parameters */ + screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + screenInfo->numPixmapFormats = NUMFORMATS; + + /* Describe how we want common pixmap formats padded */ + for (i = 0; i < NUMFORMATS; i++) + { + screenInfo->formats[i] = g_PixmapFormats[i]; + } + + /* Load pointers to DirectDraw functions */ + winGetDDProcAddresses (); + + /* Detect supported engines */ + winDetectSupportedEngines (); + + /* Load common controls library */ + g_hmodCommonControls = LoadLibraryEx ("comctl32.dll", NULL, 0); + + /* Load TrackMouseEvent function pointer */ + g_fpTrackMouseEvent = GetProcAddress (g_hmodCommonControls, + "_TrackMouseEvent"); + if (g_fpTrackMouseEvent == NULL) + { + winErrorFVerb (1, "InitOutput - Could not get pointer to function\n" + "\t_TrackMouseEvent in comctl32.dll. Try installing\n" + "\tInternet Explorer 3.0 or greater if you have not\n" + "\talready.\n"); + + /* Free the library since we won't need it */ + FreeLibrary (g_hmodCommonControls); + g_hmodCommonControls = NULL; + + /* Set function pointer to point to no operation function */ + g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA; + } + + /* Store the instance handle */ + g_hInstance = GetModuleHandle (NULL); + + /* Initialize each screen */ + for (i = 0; i < g_iNumScreens; ++i) + { + /* Initialize the screen */ + if (-1 == AddScreen (winScreenInit, argc, argv)) + { + FatalError ("InitOutput - Couldn't add screen %d", i); + } + } + +#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) + +#if defined(XCSECURITY) + /* Generate a cookie used by internal clients for authorization */ + if (g_fXdmcpEnabled) + winGenerateAuthorization (); +#endif + + /* Perform some one time initialization */ + if (1 == serverGeneration) + { + /* + * setlocale applies to all threads in the current process. + * Apply locale specified in LANG environment variable. + */ + setlocale (LC_ALL, ""); + } +#endif + +#if CYGDEBUG || YES + winDebug ("InitOutput - Returning.\n"); +#endif +} + + +/* + * winCheckDisplayNumber - Check if another instance of Cygwin/X is + * already running on the same display number. If no one exists, + * make a mutex to prevent new instances from running on the same display. + * + * return FALSE if the display number is already used. + */ + +static Bool +winCheckDisplayNumber () +{ + int nDisp; + HANDLE mutex; + char name[MAX_PATH]; + char * pszPrefix = '\0'; + OSVERSIONINFO osvi = {0}; + + /* Check display range */ + nDisp = atoi (display); + if (nDisp < 0 || nDisp > 65535) + { + ErrorF ("winCheckDisplayNumber - Bad display number: %d\n", nDisp); + return FALSE; + } + + /* Set first character of mutex name to null */ + name[0] = '\0'; + + /* Get operating system version information */ + osvi.dwOSVersionInfoSize = sizeof (osvi); + GetVersionEx (&osvi); + + /* Want a mutex shared among all terminals on NT > 4.0 */ + if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT + && osvi.dwMajorVersion >= 5) + { + pszPrefix = "Global\\"; + } + + /* Setup Cygwin/X specific part of name */ + snprintf (name, sizeof(name), "%sCYGWINX_DISPLAY:%d", pszPrefix, nDisp); + + /* Windows automatically releases the mutex when this process exits */ + mutex = CreateMutex (NULL, FALSE, name); + if (!mutex) + { + LPVOID lpMsgBuf; + + /* Display a fancy error message */ + FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError (), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &lpMsgBuf, + 0, NULL); + ErrorF ("winCheckDisplayNumber - CreateMutex failed: %s\n", + (LPSTR)lpMsgBuf); + LocalFree (lpMsgBuf); + + return FALSE; + } + if (GetLastError () == ERROR_ALREADY_EXISTS) + { + ErrorF ("winCheckDisplayNumber - " + PROJECT_NAME " is already running on display %d\n", + nDisp); + return FALSE; + } + + return TRUE; +} + +#ifdef DPMSExtension +Bool DPMSSupported(void) +{ + return FALSE; +} + +void DPMSSet(int level) +{ + return; +} + +int DPMSGet(int *plevel) +{ + return 0; +} +#endif diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am new file mode 100644 index 000000000..5ffba1274 --- /dev/null +++ b/hw/xwin/Makefile.am @@ -0,0 +1,197 @@ +bin_PROGRAMS = XWin + +if XWIN_CLIPBOARD +SRCS_CLIPBOARD = \ + winclipboardinit.c \ + winclipboardtextconv.c \ + winclipboardthread.c \ + winclipboardunicode.c \ + winclipboardwndproc.c \ + winclipboardwrappers.c \ + winclipboardxevents.c +DEFS_CLIPBOARD = -DXWIN_CLIPBOARD +endif + +if XWIN_GLX_WINDOWS +SRCS_GLX_WINDOWS = \ + winpriv.c +DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS +endif + +if XWIN_MULTIWINDOW +SRCS_MULTIWINDOW = \ + winmultiwindowshape.c \ + winmultiwindowwindow.c \ + winmultiwindowwm.c \ + winmultiwindowwndproc.c +DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW +endif + +if XWIN_MULTIWINDOWEXTWM +SRCS_MULTIWINDOWEXTWM = \ + winwin32rootless.c \ + winwin32rootlesswindow.c \ + winwin32rootlesswndproc.c \ + winwindowswm.c +DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM +endif + +if XWIN_NATIVEGDI +SRCS_NATIVEGDI = \ + winclip.c \ + winfillsp.c \ + winfont.c \ + wingc.c \ + wingetsp.c \ + winnativegdi.c \ + winpixmap.c \ + winpolyline.c \ + winpushpxl.c \ + winrop.c \ + winsetsp.c +DEFS_NATIVEGDI = -DXWIN_NATIVEGDI +endif + +if XWIN_PRIMARYFB +SRCS_PRIMARYFB = \ + winpfbdd.c +DEFS_PRIMARYFB = -DXWIN_PRIMARYFB +endif + +if XWIN_RANDR +SRCS_RANDR = \ + winrandr.c +DEFS_RANDR = -DXWIN_RANDR +endif + +if XWIN_XV +SRCS_XV = \ + winvideo.c +DEFS_XV = -DXWIN_XV +endif + +SRCS = InitInput.c \ + InitOutput.c \ + winallpriv.c \ + winauth.c \ + winblock.c \ + wincmap.c \ + winconfig.c \ + wincreatewnd.c \ + wincursor.c \ + windialogs.c \ + winengine.c \ + winerror.c \ + winglobals.c \ + winkeybd.c \ + winkeyhook.c \ + winmisc.c \ + winmouse.c \ + winmsg.c \ + winmultiwindowclass.c \ + winmultiwindowicons.c \ + winprefs.c \ + winprefsyacc.y \ + winprefslex.l \ + winprocarg.c \ + winregistry.c \ + winscrinit.c \ + winshaddd.c \ + winshadddnl.c \ + winshadgdi.c \ + wintrayicon.c \ + winvalargs.c \ + winwakeup.c \ + winwindow.c \ + winwndproc.c \ + ddraw.h \ + winclipboard.h \ + winconfig.h \ + win.h \ + winkeybd.h \ + winkeymap.h \ + winkeynames.h \ + winlayouts.h \ + winmessages.h \ + winmsg.h \ + winms.h \ + winmultiwindowclass.h \ + winprefs.h \ + winpriv.h \ + winresource.h \ + winwindow.h \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap.c \ + $(SRCS_CLIPBOARD) \ + $(SRCS_GLX_WINDOWS) \ + $(SRCS_MULTIWINDOW) \ + $(SRCS_MULTIWINDOWEXTWM) \ + $(SRCS_NATIVEGDI) \ + $(SRCS_PRIMARYFB) \ + $(SRCS_RANDR) \ + $(SRCS_XV) + + DEFS = $(DEFS_CLIPBOARD) \ + $(DEFS_GLX_WINDOWS) \ + $(DEFS_MULTIWINDOW) \ + $(DEFS_MULTIWINDOWEXTWM) \ + $(DEFS_NATIVEGDI) \ + $(DEFS_PRIMARYFB) \ + $(DEFS_RANDR) \ + $(DEFS_XV) + +XWin_SOURCES = $(SRCS) + +INCLUDES = -I$(top_srcdir)/miext/rootless \ + -I$(top_srcdir)/miext/rootless/safeAlpha + +XWIN_LIBS = \ + $(top_builddir)/fb/libfb.la \ + $(XSERVER_LIBS) + +XWin_DEPENDENCIES = $(XWIN_LIBS) +XWin_LDADD = $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) + +XWin_LDFLAGS = -mwindows -static + +winprefsyacc.h: winprefsyacc.c +winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h + +BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c +CLEANFILES = $(BUILT_SOURCES) + +AM_YFLAGS = -d +AM_LFLAGS = -i +AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ + $(XWINMODULES_CFLAGS) + +dist_man1_MANS = XWin.man XWinrc.man + +EXTRA_DIST = \ + _usr_X11R6_lib_X11_system.XWinrc \ + X-boxed.ico \ + X.ico \ + XWin.rc \ + xlaunch/config.cc \ + xlaunch/COPYING \ + xlaunch/main.cc \ + xlaunch/resources/dialog.rc \ + xlaunch/resources/fullscreen.bmp \ + xlaunch/resources/images.rc \ + xlaunch/resources/multiwindow.bmp \ + xlaunch/resources/nodecoration.bmp \ + xlaunch/resources/resources.h \ + xlaunch/resources/resources.rc \ + xlaunch/resources/strings.rc \ + xlaunch/resources/windowed.bmp \ + xlaunch/window/dialog.cc \ + xlaunch/window/dialog.h \ + xlaunch/window/util.cc \ + xlaunch/window/util.h \ + xlaunch/window/window.cc \ + xlaunch/window/window.h \ + xlaunch/window/wizard.cc \ + xlaunch/window/wizard.h + +relink: + rm -f XWin && $(MAKE) XWin diff --git a/hw/xwin/README b/hw/xwin/README new file mode 100644 index 000000000..219fd1337 --- /dev/null +++ b/hw/xwin/README @@ -0,0 +1,141 @@ +Cygwin/X Release Notes +====================== + +Release X11R6.7 +=============== + +Cygwin/X has continued its rapid pace of development that it has sustained +since Spring 2001 and this release shows it, we now have: a stable and fast +multi-window mode, seamless clipboard integration, a configurable tray menu +icon, popups on error messages pointing users to the log file and our mailing +list, the beginnings of indirect 3D acceleration for OpenGL applications, +improved non-US keyboard and clipboard support, and only a handful of bugs +that continue to be reported. + +Between the XFree86 4.3.0 release and the X.Org X11R6.7 release the Cyg- +win/XFree86 project broke away from The XFree86 Project, Inc. due to a lack +of support from the XFree86 project. As such, the Cygwin/XFree86 project was +renamed to the Cygwin/X project and the upstream source code tree that Cyg- +win/X pulls from and pushes to is now the tree managed by the X.Org Founda- +tion. The Cygwin/X project has seen a rush of development and interest in +the project since the split; one metric showing this is that the number of +CVS committers we have has gone from zero to six. + +The most outstanding features of this release are + + o Major multi-window mode improvements. (Takuma Murakami, Earle F. + Philhower III) + + o Initial work of accelerated OpenGL using the windows OpenGL drivers. + (Alexander Gottwald) + + o Massive rework of clipboard integration with windows. (Harold L Hunt II, + Kensuke Matsuzaki) + + o Improved Japanese clipboard and keyboard support. (Kensuke Matsuzaki, + Takuma Murakami, Alexander Gottwald) + + o Customizable tray menu icon allowing shortcuts to start programs, + etc.(Earle F. Philhower III) + + o New icons. (Jehan Bing, Michael Bax, Benjamin Rienfenstahl) + + o Fix some multi-monitor problems.(Takuma Murakami) + + o Fix repeated key strokes. (Ivan Pascal) + + o Automatic keyboard layouts for the most frequently used keyboard lay- + outs. (Alexander Gottwald) + + o Built in SHM support with detection of the SHM engine (cygserver). + (Ralf Habacker, Harold L Hunt II) + + o Merged in work on the NativeGDI engine. (Alan Hourihane) + +OpenGL with Cygwin/X +==================== + +Cygwin/X has supported GLX only with software rendering provided by the Mesa +library. Starting with X11R6.7 we add support for hardware accelerated OpenGL. + +This support is still under development and still has some bigger problems. +To provide both versions (the stable software rendering and the new hardware +accelerated) we ship to binaries. XWin.exe contains the software rendering +and XWin_GL.exe uses the hardware acceleration provided by the windows drivers. + +The known problems with hardware accelerated OpenGL are: + + o Only multiwindow mode is useful. In the other modes the OpenGL output + does not align with the X11 windows. + + o Using two programs which require different visuals will fail. For example + glxgears and glxinfo will not work without restarting XWin_GL.exe. + + o OpenGL extensions and functions from OpenGL 1.2 and later should work + but are not completely tested. + + o The standard Windows OpenGL driver will produce no output. Use the one + from your video adapter vendor. + +If you notice problems with some programs please send a message with the +logfile /tmp/XWin.log and a short error description to + +The hardware accelerated OpenGL was tested using: + + o glxgears + o glxinfo + o blender + o tuxkart + o GLUT demos (some did fail) + o tuxracer (currently not working) + + +Release X11R6.8 +=============== + +Having reached a quite mature state in release X11R6.7 the development +has slowed down a little bit. Some of the former active developers have +retired or cut their work for the Cygwin/X project due to conflicts with +job, study and family. + +The X11R6.8 release now includes major improvements from the xserver project. +This includes the XFixes, Damage, Composite and XEVIE extension which is a +major step towards allowing Cygwin/X to have real transparency. + +But at the current state Composite is not working with Cygwin/X. Not all code +in the Cygwin/X Server has been updated to support the Composite feature and +using it will even crash the xserver. But as a second problem nearly all +functions required for compositing are lacking acceleration in Cygwin/X so +the feature would not be very useful if it would work. So it is disabled by +default. + +OpenGL with Cygwin/X +==================== + +The OpenGL support has lost some of it's limitations from the last release +and should be much more stable. But due to missing wide spread testing in +the community it is still available in a separate program. XWin still uses +the old software OpenGL which is known to be stable. + +The known problems with hardware accelerated OpenGL are: + + o Only multiwindow mode is useful. In the other modes the OpenGL output + does not align with the X11 windows. + + o OpenGL extensions and functions from OpenGL 1.2 and later should work + but are not completely tested. + + o The standard Windows OpenGL driver will produce no output. Use the one + from your video adapter vendor. + +If you notice problems with some programs please send a message with the +logfile /tmp/XWin.log and a short error description to + +The hardware accelerated OpenGL was tested using: + + o glxgears + o glxinfo + o blender + o tuxkart + o GLUT demos (some did fail) + diff --git a/hw/xwin/X-boxed.ico b/hw/xwin/X-boxed.ico new file mode 100755 index 0000000000000000000000000000000000000000..0727042539bb1b3f248e2c146379be37b6b535c5 GIT binary patch literal 12902 zcmeI2O^6lQ700imu^&aJU$8skk|2^efO!m z``Ksi*T4S*j#7?{qt8)TH$|2rOOd4_WBmk@A$xmEX^QaGe=Na2veK`Fr@g+mI56b>mIlqMWf zIHYh$;gG^Xsly?KLkfo!4k;W`j|?6uJW}Do^9d_uk#Wx8lEEc|i%uCX8O}2tWf;xi zqG3Rpag)I%gNud*9vM6`cx3R%;Gv;{M+S!s4jCLIbQwG{IAm}r^c$1KAiga?xXDEyN~ZazI8d&H*);<@!!Y4EKwi-ePYvxLmv)( z;vmaLRCM-8xN??dBnAck3b+;UDDbCCD?Ern0gpm>Ffm>6#n15KeC|n-Y}Ug=d`+M;UwE8!pVfe9e3<## zu4HkNzM461YJ%1HXy)s4$&=DTrH{k@G)Y1(RPk$ueXZgc##hdR-HM~>Bj*OFIGR3o zZh(@b>YL6D5IBmy?c4yy5&f8R(|hHJe%!eMl%x6&114SUd3nj1uY+&3HS-jbc4^^a zo%+lKwbS!{bjpw3I_F>P{J9^_{lX94z9>iU!LdunS1$FA=cC@o9Dm<7>fPQx>OGtp z^#&YYcDa5$>OJ84;MAzMa&FYipO1RmzT|i@y0rbprHeD8V;8z!j*pgq=>PWKaew5)Lo{-o;% zwl6`f`Sq2s54pmNMe<|E5UxXa#q#Zrw>+DHnqOl`@@mQVuax=p|16Jg#>w*E6H}fm z4bqf2ZRNj`mT%?1Tlp_J>YI@N@@*6~dH;swl()R)vwJo9;H_TfuL~rfyp8L8b#X)9 z+EISGO6sLaPk3Li?haX)^%=Z-RlQoD!JDg^18HA9Z!C&i>6>T2zCa#EKX~?jX0P^x zXTWR5H<}LkR^#pPwOaFg*1ll#DHb83njUY`vk#s7>22rEf9TvV-*)a-92bw-apBL- zUHGSSKl_(+=e}_6)W0dkjHVcUO|kGj!towQ`Tle}=}c_7z8b#H`?GDfRW~ZvM(Rsf z%Z^@gZFNB@-_=dZRG~g7`?spui?hdjbh%+D7kH=_%9}PcDTY;b!>Z0@H8j~6%KLZ_ zc~&??^gXRRM>SNMF?sDd7reMr{7`S{1@fhw5?qga@gz;|6<>MIMXan%ZhKa(n<%Dg5Y;feMKYF^0GO8ao^h@CRzl^p9A zke6#+%a`2@alWJZd)5FNp4L;m(@&xm-`=T%H8Kv2CzFRTfIL*!d_)!6Skp6 z`zIuI%{U&{Adf=#OWve zfse=sv%1*vfEeE(A3%Frs}SRxd+W;zAiPfs4U*RW_w*ikC zP_1)?pG4m9KAv-lpG@8cJnyp3)WW0%{50|gl4qL|U5%ek-UifjHv2CjZvzC-sNd1o zHuixvyx)sfK5b(E<>YNZIcM;%B5wn3;eg*|!M~Ec4UmYB*AGoM{j8IGozt`((U$z1 ziGb`=_j4TKDC?p5SNNUmRexs^&nBv6Q19sJ)0FGqK&pmvkNm!f zzFF0P7|CelW_%cGJ>Wnh7v^%$9kpHYPYJ0}#{u!pwdOioJ>te!_`BDwdc;;eVyhm( z-|W3LSu;>s%QqMOSDKAq~y#Mzb?Z1vaJ753+ literal 0 HcmV?d00001 diff --git a/hw/xwin/X.ico b/hw/xwin/X.ico new file mode 100644 index 0000000000000000000000000000000000000000..d47168fca16b21a1e97bc125b508e9769aea6819 GIT binary patch literal 20870 zcmeI436PXUmd9UpHB>i8S91!AbPI@Ff`TG8Yc~QOh(fQd=m-i5)an|m9m3j#;&!pH z+B)v`gflU_5o3f#c;SX89y8vh#0ZFna)?}Nb2!{ss4OKk{q67Ncl1|RcXfjkvk^YX z`o7G3`7-lm=F80gt7?&ebduuYVxIXjC?N8Yi1g}Z$M+CFL?|tF;&~z)g95+6Um&-& z6M3(_^4sxMybtW8{C0d<0p+{8{JrEh%KrWgm%o=>84_vi>+<)KWt6>qpvzw>x8+lQ zq|09_wS^+nFLL=yWf|@GdYs50+RUp^t!O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