aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-14 13:47:55 +0000
committermarha <marha@users.sourceforge.net>2010-02-14 13:47:55 +0000
commit8d38172d866775594af3185ae3fbd8d750677650 (patch)
tree2514d176474cc8adf7911a57724cc681c1359b47 /xorg-server/hw/xwin
parent26f62ef5ccd04fa3a55632d808ca6e1061cfb983 (diff)
downloadvcxsrv-8d38172d866775594af3185ae3fbd8d750677650.tar.gz
vcxsrv-8d38172d866775594af3185ae3fbd8d750677650.tar.bz2
vcxsrv-8d38172d866775594af3185ae3fbd8d750677650.zip
Updated to xorg-server-1.7.99.901
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c188
-rw-r--r--xorg-server/hw/xwin/Makefile.am6
-rw-r--r--xorg-server/hw/xwin/Makefile.in59
-rw-r--r--xorg-server/hw/xwin/XWin.man.pre401
-rw-r--r--xorg-server/hw/xwin/XWin.rc52
-rw-r--r--xorg-server/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc125
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c3
-rw-r--r--xorg-server/hw/xwin/wincursor.c3
-rw-r--r--xorg-server/hw/xwin/windialogs.c6
-rw-r--r--xorg-server/hw/xwin/winerror.c2
-rw-r--r--xorg-server/hw/xwin/winkeybd.c4
-rw-r--r--xorg-server/hw/xwin/winmultiwindowshape.c3
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c7
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c124
-rw-r--r--xorg-server/hw/xwin/winprefs.c4
-rw-r--r--xorg-server/hw/xwin/winprefslex.l2
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y4
-rw-r--r--xorg-server/hw/xwin/winprocarg.c1
-rw-r--r--xorg-server/hw/xwin/winwindow.h1
19 files changed, 509 insertions, 486 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 91f5ec09b..acb7d4ab2 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -746,6 +746,29 @@ OsVendorInit (void)
static void
winUseMsg (void)
{
+ ErrorF("\n");
+ ErrorF("\n");
+ ErrorF(EXECUTABLE_NAME " Device Dependent Usage:\n");
+ ErrorF("\n");
+
+#ifdef XWIN_CLIPBOARD
+ ErrorF ("-[no]clipboard\n"
+ "\tEnable [disable] the clipboard integration. Default is enabled.\n");
+#endif
+
+ 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.\n");
+
+#ifdef XWIN_XF86CONFIG
+ ErrorF ("-config\n"
+ "\tSpecify a configuration file.\n");
+
+ ErrorF ("-configdir\n"
+ "\tSpecify a configuration directory.\n");
+#endif
+
ErrorF ("-depth bits_per_pixel\n"
"\tSpecify an optional bitdepth to use in fullscreen mode\n"
"\twith a DirectDraw engine.\n");
@@ -754,6 +777,15 @@ winUseMsg (void)
"\tEmulate 3 button mouse with an optional timeout in\n"
"\tmilliseconds.\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 ("-engine engine_type_id\n"
"\tOverride the server's automatically selected engine type:\n"
"\t\t1 - Shadow GDI\n"
@@ -766,135 +798,121 @@ winUseMsg (void)
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");
+ ErrorF ("-ignoreinput\n"
+ "\tIgnore keyboard and mouse input.\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_XF86CONFIG
+ ErrorF ("-keyboard\n"
+ "\tSpecify a keyboard device from the configuration file.\n");
+#endif
+
+ ErrorF ("-[no]keyhook\n"
+ "\tGrab special Windows keypresses like Alt-Tab or the Menu "
+ "key.\n");
+
+ ErrorF ("-lesspointer\n"
+ "\tHide the windows mouse pointer when it is over any\n"
+ "\t" EXECUTABLE_NAME " window. This prevents ghost cursors appearing when\n"
+ "\tthe Windows cursor is drawn on top of the X cursor\n");
+
+ ErrorF ("-logfile filename\n"
+ "\tWrite log messages to <filename>.\n");
+
+ ErrorF ("-logverbose verbosity\n"
+ "\tSet the verbosity of log messages. [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]multimonitors or -[no]multiplemonitors\n"
+ "\tUse the entire virtual screen if multiple\n"
+ "\tmonitors are present.\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_MULTIWINDOWEXTWM
+ ErrorF ("-mwextwm\n"
+ "\tRun the server in multi-window external window manager mode.\n");
+#endif
-#ifdef XWIN_CLIPBOARD
- ErrorF ("-[no]clipboard\n"
- "\tEnable [disable] the clipboard integration. Default is enabled.\n");
+ ErrorF ("-nodecoration\n"
+ "\tDo not draw a window border, title bar, etc. Windowed\n"
+ "\tmode only.\n");
+#ifdef XWIN_CLIPBOARD
ErrorF ("-nounicodeclipboard\n"
- "\tDo not use Unicode clipboard even if NT-based platform.\n");
+ "\tDo not use Unicode clipboard even if on a NT-based platform.\n");
#endif
+ ErrorF ("-refresh rate_in_Hz\n"
+ "\tSpecify an optional refresh rate to use in fullscreen mode\n"
+ "\twith a DirectDraw engine.\n");
+
+ ErrorF ("-rootless\n"
+ "\tRun the server in rootless mode.\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 ("-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 ("-silent-dup-error\n"
+ "\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
+ "\texit silently and don’t display any error message.\n");
+
+ ErrorF ("-swcursor\n"
+ "\tDisable the usage of the Windows cursor and use the X11 software\n"
+ "\tcursor instead.\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 ("-configdir\n"
- "\tSpecify a configuration directory.\n");
-
- ErrorF ("-keyboard\n"
- "\tSpecify a keyboard device from the configuration file.\n");
-#endif
-
- 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 ("-xkbmodel XKBModel\n"
+ "\tEquivalent to XKBModel in XF86Config files.\n");
ErrorF ("-xkboptions XKBOptions\n"
"\tEquivalent to XKBOptions in XF86Config files.\n");
- ErrorF ("-logfile filename\n"
- "\tWrite logmessages to <filename> 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 ("-xkbrules XKBRules\n"
+ "\tEquivalent to XKBRules in XF86Config files.\n");
- ErrorF ("-swcursor\n"
- "\tDisable the usage of the windows cursor and use the X11 software "
- "cursor instead\n");
+ ErrorF ("-xkbvariant XKBVariant\n"
+ "\tEquivalent to XKBVariant in XF86Config files.\n"
+ "\tFor example: -xkbvariant nodeadkeys\n");
}
/* See Porting Layer Definition - p. 57 */
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index a76b56957..8b1897235 100644
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -151,7 +151,7 @@ XWin_DEPENDENCIES = $(XWIN_LIBS)
XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
.rc.o:
- $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -DPROJECT_NAME=\"$(VENDOR_NAME_SHORT)\"
+ $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include
XWin_LDFLAGS = -mwindows -static
@@ -190,12 +190,14 @@ XWinrc.$(FILE_MAN_SUFFIX): XWinrc.man
EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir)
+xwinconfigdir = $(sysconfdir)/X11
+xwinconfig_DATA = system.XWinrc
+
include $(top_srcdir)/cpprules.in
EXTRA_DIST = \
$(GLX_EXTRAS) \
$(MAN_SRCS) \
- _usr_X11R6_lib_X11_system.XWinrc \
X.ico \
XWin.rc \
xlaunch/config.cc \
diff --git a/xorg-server/hw/xwin/Makefile.in b/xorg-server/hw/xwin/Makefile.in
index af96f7508..1d7fb3b20 100644
--- a/xorg-server/hw/xwin/Makefile.in
+++ b/xorg-server/hw/xwin/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -64,7 +64,7 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
- "$(DESTDIR)$(filemandir)"
+ "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(xwinconfigdir)"
PROGRAMS = $(bin_PROGRAMS)
am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \
winauth.c winblock.c wincmap.c winconfig.c wincreatewnd.c \
@@ -202,7 +202,7 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-DATA = $(appman_DATA) $(fileman_DATA)
+DATA = $(appman_DATA) $(fileman_DATA) $(xwinconfig_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -388,8 +388,11 @@ SHELL = @SHELL@
SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
STRIP = @STRIP@
+SYSCONFDIR = @SYSCONFDIR@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
+UDEV_CFLAGS = @UDEV_CFLAGS@
+UDEV_LIBS = @UDEV_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
VERSION = @VERSION@
@@ -449,6 +452,7 @@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
YACC = @YACC@
YFLAGS = @YFLAGS@
+__XCONFIGDIR__ = @__XCONFIGDIR__@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
@@ -654,6 +658,8 @@ appman_DATA = XWin.$(APP_MAN_SUFFIX)
filemandir = $(FILE_MAN_DIR)
fileman_DATA = XWinrc.$(FILE_MAN_SUFFIX)
EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir)
+xwinconfigdir = $(sysconfdir)/X11
+xwinconfig_DATA = system.XWinrc
SUFFIXES = .pre .man .man.pre
# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
@@ -685,7 +691,9 @@ MANDEFS = \
-D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
-D__mandir__=$(mandir) \
-D__projectroot__=$(prefix) \
- -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \
+ -D__datadir__=$(datadir) \
+ -D__xconfigfile__=$(__XCONFIGFILE__) \
+ -D__xconfigdir__=$(__XCONFIGDIR__) \
-D__xkbdir__=$(XKB_BASE_DIRECTORY) \
-D__modulepath__="$(DEFAULT_MODULE_PATH)" \
-D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME)
@@ -693,7 +701,6 @@ MANDEFS = \
EXTRA_DIST = \
$(GLX_EXTRAS) \
$(MAN_SRCS) \
- _usr_X11R6_lib_X11_system.XWinrc \
X.ico \
XWin.rc \
xlaunch/config.cc \
@@ -1012,6 +1019,26 @@ uninstall-filemanDATA:
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(filemandir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(filemandir)" && rm -f $$files
+install-xwinconfigDATA: $(xwinconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(xwinconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(xwinconfigdir)"
+ @list='$(xwinconfig_DATA)'; test -n "$(xwinconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xwinconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(xwinconfigdir)" || exit $$?; \
+ done
+
+uninstall-xwinconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xwinconfig_DATA)'; test -n "$(xwinconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xwinconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xwinconfigdir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1100,7 +1127,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(xwinconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -1156,7 +1183,8 @@ info: info-am
info-am:
-install-data-am: install-appmanDATA install-filemanDATA
+install-data-am: install-appmanDATA install-filemanDATA \
+ install-xwinconfigDATA
install-dvi: install-dvi-am
@@ -1203,7 +1231,7 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
- uninstall-filemanDATA
+ uninstall-filemanDATA uninstall-xwinconfigDATA
.MAKE: all check install install-am install-strip
@@ -1216,16 +1244,17 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
install-exec-am install-filemanDATA install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-appmanDATA uninstall-binPROGRAMS \
- uninstall-filemanDATA
+ install-strip install-xwinconfigDATA installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-appmanDATA \
+ uninstall-binPROGRAMS uninstall-filemanDATA \
+ uninstall-xwinconfigDATA
.rc.o:
- $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -DPROJECT_NAME=\"$(VENDOR_NAME_SHORT)\"
+ $(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include
winprefsyacc.h: winprefsyacc.c
winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
diff --git a/xorg-server/hw/xwin/XWin.man.pre b/xorg-server/hw/xwin/XWin.man.pre
index 0bad65c60..6b28b51d4 100644
--- a/xorg-server/hw/xwin/XWin.man.pre
+++ b/xorg-server/hw/xwin/XWin.man.pre
@@ -9,83 +9,171 @@ XWin \- X Server for the Cygwin environment on Microsoft Windows
.SH DESCRIPTION
-.I XWin is an X Server for the X Window System on the Cygwin environment
+\fIXWin\fP is an X Server for the X Window System on the Cygwin environment
running on Microsoft Windows.
.SH MODES
-\fIXWin\fP can operate in five different and incompatible modes:
+\fIXWin\fP can operate in 3 different modes:
.br
-* \fISingle Window\fP: This is the default option. The X server
-appears as a single Windows window and all X windows are contained
-within this window. This mode requires an external window manager.
-.br
-* \fINo Decoration\fP: This mode is like single window mode except
-that the X server window does not have a title bar or border, thus
-maximizing the amount of space available for X windows within the X
-server window. This mode requires an external window manager.
-.br
-* \fIFull Screen\fP: This mode is like single window mode except that
-the X server window takes the full screen, covering completely the
-Windows desktop. This mode requires an external window manager.
-.br
-* \fIRootless\fP: The X server works on a window covering the whole
-screen but the root window (traditionally covered with an X hatch
-pattern) is hidden from view. This mode requires an external window
-manager.
+* \fISingle Window\fP: This is the default mode. Each X screen
+appears as a single \fIWindows\fP window and all X windows are contained
+within this window.
+(In X terminology, the \fIWindows\fP window contains the root window for
+the screen)
.br
* \fIMulti-Window\fP: In this mode \fIXWin\fP uses its own integrated
window manager in order to handle the top-level X windows, in such a
-way that they appear as normal Windows windows.
+way that they appear as normal \fIWindows\fP windows.
+.br
+* \fIRootless\fP: In this mode the X server works in a window
+containing the whole screen but this root window (traditionally covered with an X hatch
+pattern) is hidden from view, so only top-level X windows are seen.
+
+.SH OPTIONS
+In addition to the normal server options described in the \fIXserver(1)\fP
+manual page, \fIXWin\fP accepts the following command line switches,
+\fIall\fP of which are optional:
+
+.SH OPTIONS CONTROLLING WINDOWING MODE
+Only one of these options may be specified.
+.TP 8
+.B (default)
+Windowed or rooted mode.
+Each X screen appears as a single \fIWindows\fP window and all X windows are
+contained within those windows.
+.TP 8
+.B \-multiwindow
+Each top-level X window appears in its own \fIWindows\fP window.
+Also start the integrated \fIWindows\fP-based window manager.
+.TP 8
+.B \-rootless
+Run the server in rootless mode.
+The X server works on a window covering the whole screen but the root window
+is hidden from view.
+.TP 8
+.B \-mwextwm
+Experimental.
+The mode combines \fB\-rootless\fP mode drawing with native \fIWindows\fP
+window frames managed by the experimental external window manager \fIxwinwm\fP.
.PP
-NOTE: \fIMulti-Window\fP mode will crash if an external window manager
-such as \fItwm\fP or \fIfvwm\fP is launched since \fIMulti-Window\fP
-uses its own internal window manager; all other modes require an
-external window manager in order to move, resize, and perform other
+\fBNOTE:\fP \fI-multiwindow\fP mode uses its own internal window manager.
+All other modes require an external window manager in order to move, resize, and perform other
operations on the individual X windows.
+.SH OPTIONS FOR SPECIFYING X SCREENS
+An X display may be composed of multiple screens.
+The default behaviour is to create a single screen 0 that is roughly the
+size of useful area of the primary monitor (allowing for any window
+decorations and the task-bar).
-.SH LOG
-As it runs \fIXWin\fP writes messages indicating the most relevant events
-to the console
-from which it was called and to a log file that by default is located at \fI
-__logdir__/XWin.0.log\fP. This file is mainly for debugging purposes.
+Screen specific parameters, such as \fB\-fullscreen\fP, can be applied as a
+default to all screens by placing those screen specific parameters
+before any \fB\-screen\fP parameter. Screen specific parameters placed after
+the first \fB\-screen\fP parameter will apply only to the immediately
+preceeding \fB\-screen\fP parameter.
+.TP 8
+.B \-[no]multimonitors or \-[no]multiplemonitors
+Create a screen 0 that covers all monitors [the primary monitor] on a system with
+multiple monitors.
+This option is currently enabled by default in \fB\-multiwindow\fP mode.
+.TP 8
+.B "\-screen \fIscreen_number\fP [\fIW\fP \fIH\fP [\fIX\fP \fIY\fP] | [[\fIW\fPx\fIH\fP[+\fIX\fP+\fIY\fP]][@\fIM\fP]] ] "
+Create screen number
+.I screen_number
+and optionally specify it's
+.I height,
+.I width
+and
+.I initial position.
+Additionally a
+.I
+monitor number
+(which count from 1) can be specified to place the screen on,
+at which point, all coordinates become relative to that monitor.
+Screen numbers must be contiguous starting from zero and cannot be duplicated.
+Examples:
-.SH PREFERENCES FILE
-On startup \fIXWin\fP looks for the file \fI$HOME/.XWinrc\fP or, if
-the previous file does not exist, \fI
-__sysconfdir__/X11/system.XWinrc\fP. \fI.XWinrc\fP allows setting
-preferences for the following:
-.br
-1- To include items into the menu associated with the \fIXWin\fP icon
-which is in the \fIWindows\fP system tray. This functions in all
-modes that have a tray icon.
-.br
-2- To include items in the menu which is associated with the Windows
-window that \fIXWin -multiwindow\fP produces for each top-level X
-window. That can be done both for the generic case and for particular
-programs.
-.br
-3- To change the icon that is associated to the Windows window that
-\fIXWin -multiwindow\fP produces for each top-level X-window. Again,
-that can be done both for the generic case and for particular
-programs.
-.PP
-The format of the \fI.XWinrc\fP file is given in the man page XWinrc(5).
+.I " -screen 0 @1 ; on 1st monitor using its full resolution (the default)"
+.I " -screen 0 800x600+100+100@2 ; on 2nd monitor offset 100,100 size 800x600"
-.SH OPTIONS
-In addition to the normal server options described in the \fIXserver(1)\fP
-manual page, \fIXWin\fP accepts the following command line switches,
-\fIall\fP of which are optional:
+.I " -screen 0 1024x768@3 ; on 3rd monitor size 1024x768"
+
+.SH OPTIONS CONTROLLING THE APPEARANCE OF THE X SCREEN WINDOWS
+These parameters only apply to windowed mode screens i.e. not
+in \fB-multwindow\fP or \fB-rootless\fP mode
+.TP 8
+.B "\-fullscreen"
+The X server window takes the full screen, covering completely the
+\fIWindows\fP desktop.
+.TP 8
+.B \-nodecoration
+Do not give the Cygwin/X window a \fIWindows\fP window border, title bar,
+etc.
+This parameter is ignored when the \fB\-fullscreen\fP parameter is specified.
+.TP 8
+.B \-scrollbars
+In windowed mode, allow screens bigger than the \fIWindows\fP desktop.
+Moreover, if the window has decorations, one can now resize it.
+This parameter is ignored when the \fB\-fullscreen\fP parameter is specified.
+
+
+.SH OPTIONS CONTROLLING WINDOWS INTEGRATION
.TP 8
.B \-[no]clipboard
Enables [disables] the integration between the Cygwin/X clipboard and
-Windows clipboard. The default is enabled.
+\fIWindows\fP clipboard. The default is enabled.
+.TP 8
+.B "\-emulate3buttons [\fItimeout\fP]"
+Emulate a three button mouse; pressing both buttons within
+.I timeout
+milliseconds causes an emulated middle button press. The default
+.I timeout
+is 50 milliseconds. Note that most mice with scroll wheel have middle
+button functionality, usually you will need this option only if you have
+a two button mouse without scroll wheel.
+.TP 8
+.B \-[no]keyhook
+Enable [disable] a low-level keyboard hook for catching
+special keypresses like Menu and Alt+Tab and passing them to the X
+Server instead of letting \fIWindows\fP handle them.
+.TP 8
+.B \-lesspointer
+Normally the \fIWindows\fP mouse cursor is hidden when the mouse is
+over an active Cygwin/X window. This option causes the mouse cursor
+also to be hidden when it is over an inactive Cygwin/X window. This
+prevents the \fIWindows\fP mouse cursor from being drawn on top of the X
+cursor.
+This parameter has no effect unless \fB-swcursor\fP is also specified.
+.TP 8
+.B \-swcursor
+Disable the usage of the \fIWindows\fP cursor and use the X11 software cursor instead.
+.TP 8
+.B \-[no]trayicon
+Do not create a tray icon. Default is to create one
+icon per screen. You can globally disable tray icons with
+\fB\-notrayicon\fP, then enable it for specific screens with
+\fB\-trayicon\fP for those screens.
+.TP 8
+.B \-nounicodeclipboard
+Do not use Unicode clipboard even if on a NT-based platform.
+.TP 8
+.B \-[no]unixkill
+Enable or disable the \fICtrl-Alt-Backspace\fP key combination as a
+signal to exit the X Server. The \fICtrl-Alt-Backspace\fP key combination
+is disabled by default.
+.TP 8
+.B \-[no]winkill
+Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the
+X Server.
+The \fIAlt-F4\fP key combination is enabled by default.
+
+.SH DRAWING ENGINE OPTIONS
.TP 8
.B "\-clipupdates \fInum_boxes\fP"
-Specify an optional threshold, above which the boxes in a shadow
+Specify an optional threshold, above which the regions in a shadow
update operation will be collected into a GDI clipping region. The
clipping region is then used to do a single bit block transfer that is
constrained to the updated area by the clipping region. There is some
@@ -94,36 +182,24 @@ the clipping region, thus there may not be much benefit for a small
number of boxes (less than 10). It is even possible that this
functionality does not provide a benefit at any number of boxes; we
can only determine the usefulness of this feature through testing.
+This option probably has limited effect on current \fIWindows\fP versions
+as they already perform GDI batching.
This parameter works in conjunction with engines 1, 2, and 4 (Shadow
GDI, Shadow DirectDraw, and Shadow DirectDraw Non-Locking,
respectively).
.TP 8
-.B "\-emulate3buttons \fItimeout\fP"
-Emulate a three button mouse; pressing both buttons within
-.I timeout
-milliseconds causes an emulated middle button press. The default
-.I timeout
-is 50 milliseconds. Note that most mice with scroll wheel have middle
-button functionality, usually you will need this option only if you have
-a two button mouse without scroll wheel.
-.TP 8
-.B \-emulatepseudo
-Create a depth 8 PseudoColor visual when running in depths 15, 16, 24,
-or 32, collectively known as TrueColor depths.
- At this date (April 2004) this option is not still operative.
-.TP 8
.B "\-engine \fIengine_type_id\fP"
This option, which is intended for Cygwin/X developers,
-overrides the server's automatically supported engine type. This
+overrides the server's automatically selected engine type. This
parameter will be ignored if the specified engine type is not
supported on the current system. The supported engine type ids are 1
-- Shadow GDI, 2 - Shadow DirectDraw, and 4 - Shadow DirectDraw4.
-Additionally, there is a barely functional experimental engine type id
-16 - Native GDI.
-.TP 8
-.B "\-fullscreen [-depth \fIdepth\fP] [-refresh \fIrate_in_Hz\fP]"
-Run the server in fullscreen mode, as opposed to the default windowed
-mode.
+- Shadow GDI, 2 - Shadow DirectDraw, and 4 - Shadow DirectDraw Non-Locking.
+Additionally, there are engines with type ids
+8 - Primary DirectDraw (obsolete) and 16 - Native GDI (experimental and barely functional).
+Default behavior is to determine the engine with optimum performance that
+supports the specified depth and window configuration.
+
+.SH FULLSCREEN OPTIONS
.TP 8
.B "\-depth \fIdepth\fP"
Specify the color depth, in bits per pixel, to use when running in
@@ -134,104 +210,37 @@ fullscreen with a DirectDraw engine. This parameter is ignored if
Specify an optional refresh rate to use when running in
fullscreen with a DirectDraw engine. This parameter is ignored if
\fB\-fullscreen\fP is not specified.
+
+.SH MISCELLANEOUS OPTIONS
+See also the normal server options described in the \fIXserver(1)\fP
+manual page
+
.TP 8
.B \-help
-Write a help text to the console and to the log file.
+Write a help text listing supported command line options and their description to the console.
.TP 8
.B \-ignoreinput
Ignore keyboard and mouse input. This is usually only used for testing
and debugging purposes.
.TP 8
-.B \-[no]keyhook
-Enable [disable] a low-level keyboard hook for catching
-special key combinations like Alt+Tab and passing them to the X
-Server instead of letting \fIWindows\fP handle them.
-.TP 8
-.B \-lesspointer
-Hide the Windows mouse cursor when the mouse is over any Cygwin/X
-window (regardless of whether that window is active or inactive). This
-prevents the Windows mouse cursor from being placed overtop of the X
-cursor.
-.TP 8
-.B "\-logfile \fIFile_Name\fP"
-Change the log file from the default located at \fI
-__logdir__/XWin.0.log\fP to the one indicated by \fIFile_Name\fP.
+.B "\-logfile \fIfilename\fP"
+Change the server log file from the default of \fI
+__logdir__/XWin.n.log\fP,
+where \fIn\fP is the display number of the XWin server, to \fIfilename\fP.
.TP 8
.B "\-logverbose \fIlevel\fP"
Control the degree of verbosity of the log messages with the integer
parameter \fIlevel\fP. For \fIlevel\fP=0 only fatal errors are
-reported, for \fIlevel\fP=1 (default) simple information about
-configuration is also given, for \fIlevel\fP=2 a detailed log
+reported, for \fIlevel\fP=1 simple information about
+configuration is also given, for \fIlevel\fP=2 (default)
+additional runtime information is recorded
+and for \fIlevel\fP=3 detailed log
information (including trace and debug output) is produced. Bigger
-values will yield a still more detailed debug output. At this date
-(April 2004) the option is still not fully operative; the default
-value is 2 and the output is insensitive to the level value.
-.TP 8
-.B \-multimonitors
-Create a root window that covers all monitors on a system with
-multiple monitors.
-.TP 8
-.B \-multiwindow
-Start the integrated \fIWindowsi\fP-based window manager, which launches each
-top-level X window in its own \fIWindows\fP window. Not to be used together
-with \fB\-rootless\fP nor \fB\-fullscreen\fP.
-.TP 8
-.B \-nodecoration
-Do not give the Cygwin/X window a Windows window border, title bar,
-etc. This parameter only applies to windowed mode screens, i.e., this
-parameter is ignored when the \fB\-fullscreen\fP parameter is specified.
-.TP 8
-.B \-nounicodeclipboard
-Do not use Unicode clipboard even if NT-based platform.
-.TP 8
-.B \-rootless
-Run the server in rootless mode. Not to be used with \fB\-multiwindow\fP
-nor with \fB\-fullscreen\fP.
-.TP 8
-.B "\-screen \fIscreen_number\fP \fIwidth\fP \fIheight\fP"
-This parameter may be used to specify the
-.I screen_number,
-.I height,
-and
-.I width
-of one or several Cygwin/X screens; each Cygwin/X screen will be
-opened in its own window. When using multiple screens, be sure not to
-duplicate any screen numbers.
-.I XWin
-default behavior is to create a single screen that is roughly
-the size of the current Windows display area.
-Screen specific parameters, such as \fB\-fullscreen\fP, can be applied as a
-default to all screens by placing those screen specific parameters
-before any \fB\-screen\fP parameter. Screen specific parameters placed after
-the first \fB\-screen\fP parameter will apply only to the immediately
-preceeding \fB\-screen\fP parameter.
-.TP 8
-.B \-scrollbars
-In windowed mode, allow screens bigger than the Windows desktop.
-Moreover, if the window has decorations, one can now resize it.
-.TP 8
-.B \-[no]trayicon
-Do not create a tray icon. Default is to create one
-icon per screen. You can globally disable tray icons with
-\fB\-notrayicon\fP, then enable it for specific screens with
-\fB\-trayicon\fP for those screens.
-.TP 8
-.B \-[no]unixkill
-Enable or disable the \fICtrl-Alt-Backspace\fP key combination as a
-signal to exit the X Server. The \fICtrl-Alt-Backspace\fP key combination
-is disabled by default.
-.TP 8
-.B \-[no]winkill
-Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the
-X Server.
-The \fIAlt-F4\fP key combination is enabled by default.
-.TP 8
-.B \-swcursor
-Disable the usage of the windows cursor and use the X11 software cursor instead.
+values will yield a still more detailed debug output.
.TP 8
.B \-silent-dup-error
-If another instance of XWin is found running, exit silently and don't display
-the error message.
+If another instance of \fIXWin\fP with the same display number is found running,
+exit silently and don't display any error message.
.TP 8
.B "\-xkblayout \fIlayout\fP"
.TP 8
@@ -251,10 +260,60 @@ in order to load a German layout for a pc105 keyboard one uses
the options:
.br
.I " \-xkblayout de \-xkbmodel pc105"
+
+Alternatively one may use the \fIsetxkbmap\fP program after \fIXWin\fP is
+running.
+
+The default is to select a layout matching your current layout as
+reported by \fIWindows\fP if known, or the default X server layout
+if no matching keyboard layout was found.
+
+.SH UNDOCUMENTED OPTIONS
+These options are undocumented. Do not use them.
+
+.TP 8
+.B \-emulatepseudo
+Create a depth 8 PseudoColor visual when running in depths 15, 16, 24,
+or 32, collectively known as TrueColor depths.
+Color map manipulation is not supported, so the PseudoColor visual will
+not have the correct colors.
+This option is intended to allow applications which only work with a depth 8
+visual to operate in TrueColor modes.
+.TP 8
+.B \-internalwm
+Run the internal window manager.
+
+.SH LOG FILE
+As it runs \fIXWin\fP writes messages indicating the most relevant events
+to the console
+from which it was called and to a log file that by default is located at \fI
+__logdir__/XWin.0.log\fP. This file is mainly for debugging purposes.
+
+
+.SH PREFERENCES FILE
+On startup \fIXWin\fP looks for the file \fI$HOME/.XWinrc\fP or, if
+the previous file does not exist, \fI
+__sysconfdir__/X11/system.XWinrc\fP. \fI.XWinrc\fP allows setting
+preferences for the following:
+.br
+* To include items into the menu associated with the \fIXWin\fP icon
+which is in the \fIWindows\fP system tray. This functions in all
+modes that have a tray icon.
+.br
+* To include items in the system menu which is associated with the \fIWindows\fP
+window that \fIXWin -multiwindow\fP produces for each top-level X
+window, in both the generic case and for particular programs.
+.br
+* To change the icon that is associated to the \fIWindows\fP window that
+\fIXWin -multiwindow\fP produces for each top-level X-window.
+.br
+* To change the style that is associated to the \fIWindows\fP window that
+\fXWin I-multiwindow\fP produces for each top-level X window.
.PP
-Alternatively one may use the \fIsetxkbmap\fP program after XWin is
-running or even the \fIxmodmap\fP program for loading the old-style
-keyboard maps.
+The format of the \fI.XWinrc\fP file is given in the man page XWinrc(5).
+
+.SH EXAMPLES
+Need some examples
.SH "SEE ALSO"
@@ -268,10 +327,9 @@ ones are:
.br
- The display mode can not be changed once the X server has started.
.br
-- The XWin software is developing rapidly; it is therefore likely that
+- The \fIXWin\fP software is continuously developing; it is therefore possible that
this man page is not up to date. It is always prudent to
-look also at the output of \fIXWin -help\fP and to the Cygwin/X User Guide
-at /usr/share/doc/cygwin-x-doc-x.x.x/ug/cygwin-x-ug.xxx in order to
+look also at the output of \fIXWin -help\fP in order to
check the options that are operative.
@@ -282,6 +340,7 @@ Adamson, Michael Bax, Jehan Bing, Lev Bishop, Dr. Peter Busch, Biju G
C, Robert Collins, Nick Crabtree, Early Ehlinger, Christopher Faylor,
John Fortin, Brian Genisio, Fabrizio Gennari, Alexander Gottwald, Ralf
Habacker, Colin Harrison, Matthieu Herrb, Alan Hourihane, Pierre A
-Humblet, Harold L Hunt II, Dakshinamurthy Karra, Kensuke Matsuzaki,
-Takuma Murakami, Earle F. Philhower III, Benjamin Riefenstahl, Suhaib
-Siddiqi, Jack Tanner, and Nicholas Wourms.
+Humblet, Harold L Hunt II, Dakshinamurthy Karra, Joe Krahn,
+Paul Loewenstein, Kensuke Matsuzaki,
+Takuma Murakami, Earle F. Philhower III, Benjamin Riefenstahl, Yaakov Selkowitz,
+Suhaib Siddiqi, Jack Tanner, Jon Turney and Nicholas Wourms.
diff --git a/xorg-server/hw/xwin/XWin.rc b/xorg-server/hw/xwin/XWin.rc
index df2664dca..539bd0e4d 100644
--- a/xorg-server/hw/xwin/XWin.rc
+++ b/xorg-server/hw/xwin/XWin.rc
@@ -1,5 +1,6 @@
/*
*Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) 2008 Yaakov Selkowitz All Rights Reserved
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -20,39 +21,37 @@
*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 Harold L Hunt II
+ *Except as contained in this notice, the names of the authors
*shall not be used in advertising or otherwise to promote the sale, use
*or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
+ *from the authors.
*
- * Authors: Harold L Hunt II
+ * Authors: Harold L Hunt II, Yaakov Selkowitz
*/
-#include "windows.h"
+#include <windows.h>
#include "winresource.h"
+#include "xwin-config.h"
+#include "version-config.h"
/*
* Dialogs
*/
/* About */
-ABOUT_BOX DIALOGEX 32, 32, 240, 105
+ABOUT_BOX DIALOGEX 32, 32, 260, 105
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
-CAPTION "About " PROJECT_NAME
-FONT 8, "MS Sans Serif"
+CAPTION "About " XVENDORNAMESHORT
+FONT 8, "MS Shell Dlg 2"
BEGIN
- CONTROL PROJECT_NAME " Website", ID_ABOUT_WEBSITE, "Button",
- BS_OWNERDRAW | WS_TABSTOP, 30, 45, 75, 15
- CONTROL "Change Log", ID_ABOUT_CHANGELOG, "Button",
- BS_OWNERDRAW | WS_TABSTOP, 135, 45, 75, 15
- CONTROL "User's Guide", ID_ABOUT_UG, "Button",
- BS_OWNERDRAW | WS_TABSTOP, 30, 65, 75, 15
- CONTROL "FAQ", ID_ABOUT_FAQ, "Button",
- BS_OWNERDRAW | WS_TABSTOP, 135, 65, 75, 15
-
- DEFPUSHBUTTON "&OK", IDOK, 95, 85, 50, 15
-
- CTEXT PROJECT_NAME " X Server. Use the links below to learn more about the " PROJECT_NAME " project.", IDC_STATIC, 5, 5, 230, 35
+ CONTROL IDI_XWIN, IDC_STATIC, "Static", SS_ICON, 8, 8, 32, 32
+ LTEXT XVENDORNAMESHORT " X Server ", IDC_STATIC, 36, 8, 220, 8
+ LTEXT VENDOR_MAN_VERSION, IDC_STATIC, 36, 18, 220, 8
+ LTEXT BUILDERSTRING, IDC_STATIC, 36, 28, 220, 8
+ LTEXT "This software is licensed under the terms of the MIT/X11 License.", IDC_STATIC, 36, 48, 220, 20
+ CONTROL __VENDORDWEBSUPPORT__, ID_ABOUT_WEBSITE, "Button",
+ BS_OWNERDRAW | WS_TABSTOP, 36, 68, 68, 8
+ DEFPUSHBUTTON "&OK", IDOK, 105, 85, 50, 15
END
@@ -60,13 +59,13 @@ END
DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
-FONT 8, "MS Sans Serif"
-CAPTION PROJECT_NAME
+FONT 8, "MS Shell Dlg 2"
+CAPTION XVENDORNAMESHORT
BEGIN
DEFPUSHBUTTON "Dismiss", IDOK, 66, 80, 50, 14
- CTEXT PROJECT_NAME, IDC_STATIC, 40, 12, 100, 8
+ CTEXT XVENDORNAMESHORT, IDC_STATIC, 40, 12, 100, 8
CTEXT "Disruptive screen configuration change.", IDC_STATIC, 7, 40, 166, 8
- CTEXT "Restore previous resolution to use " PROJECT_NAME ".", IDC_STATIC, 7, 52, 166, 8
+ CTEXT "Restore previous resolution to use " XVENDORNAMESHORT ".", IDC_STATIC, 7, 52, 166, 8
END
@@ -74,8 +73,8 @@ END
EXIT_DIALOG DIALOGEX 32, 32, 180, 78
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
-FONT 8, "MS Sans Serif"
-CAPTION "Exit " PROJECT_NAME "?"
+FONT 8, "MS Shell Dlg 2"
+CAPTION "Exit " XVENDORNAMESHORT "?"
BEGIN
PUSHBUTTON "E&xit", IDOK, 55, 56, 30, 14
DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 56, 30, 14
@@ -96,7 +95,7 @@ BEGIN
MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT
MENUITEM "&About...", ID_APP_ABOUT
MENUITEM SEPARATOR
- MENUITEM "E&xit", ID_APP_EXIT
+ MENUITEM "E&xit...", ID_APP_EXIT
END
END
@@ -106,3 +105,4 @@ END
*/
IDI_XWIN ICON "X.ico"
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "XWin.exe.manifest"
diff --git a/xorg-server/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc b/xorg-server/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc
deleted file mode 100644
index 1de6e2ab0..000000000
--- a/xorg-server/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc
+++ /dev/null
@@ -1,125 +0,0 @@
-# XWin Server Resource File - EXAMPLE
-# Earle F. Philhower, III
-
-# Place in ~/.XWinrc or in /usr/X11R6/lib/X11/system.XWinrc
-
-# Keywords are case insensitive, comments legal pretty much anywhere
-# you can have an end-of-line
-
-# Comments begin with "#" or "//" and go to the end-of-line
-
-# Paths to commands are **cygwin** based (i.e. /usr/local/bin/xcalc)
-
-# Paths to icons are **WINDOWS** based (i.e. c:\windows\icons)
-
-# Menus are defined as...
-# MENU <name> {
-# <Menu Text> EXEC <command>
-# ^^ This command will have any "%display%"
-# string replaced with the proper display
-# variable (i.e. 127.0.0.1:<display>.0)
-# or <Menu Text> MENU <name-of-some-prior-defined-menu>
-# or <Menu Text> ALWAYSONTOP
-# ^^ Sets the window to display above all others
-# or <Menu Text> RELOAD
-# ^^ Causes ~/.XWinrc or the system.XWinrc file
-# to be reloaded and icons and menus regenerated
-# or SEPARATOR
-# ...
-# }
-
-# Set the taskmar menu with
-# ROOTMENU <name-of-some-prior-defined-menu>
-
-# If you want a menu to be applied to all popup window's system menu
-# DEFAULTSYSMENU <name-of-some-prior-defined-menu> <atstart|atend>
-
-# To choose a specific menu for a specific WM_CLASS or WM_NAME use ...
-# SYSMENU {
-# <class-or-name-of-window> <name-of-prior-defined-menu> <atstart|atend>
-# ...
-# }
-
-# When specifying an ICONFILE in the following commands several different
-# formats are allowed:
-# 1. Name of a regular Windows .ico format file
-# (ex: "cygwin.ico", "apple.ico")
-# 2. Name and index into a Windows .DLL
-# (ex: "c:\windows\system32\shell32.dll,4" gives the default folder icon
-# "c:\windows\system32\shell32.dll,5" gives the floppy drive icon)
-# 3. Index into XWin.EXE internal ICON resource
-# (ex: ",101" is the 1st icon inside XWin.exe)
-
-# To define where ICO files live (** Windows path**)
-# ICONDIRECTORY <windows-path i.e. c:\cygwin\usr\icons>
-# NOTE: If you specify a fully qualified path to an ICON below
-# (i.e. "c:\xxx" or "d:\xxxx")
-# this ICONDIRECTORY will not be prepended
-
-# To change the taskbar icon use...
-# TRAYICON <name-of-windows-ico-file-in-icondirectory>
-
-# To define a replacement for the standard X icon for apps w/o specified icons
-# DEFAULTICON <name-of-windows-ico-file-in-icondirectory>
-
-# To define substitute icons on a per-window basis use...
-# ICONS {
-# <class-or-name-of-window> <icon-file-name.ico>
-# ...
-# }
-# In the case where multiple matches occur, the first listed in the ICONS
-# section will be chosen.
-
-# To disable exit confirmation dialog add the line containing SilentExit
-
-# DEBUG <string> prints out the string to the XWin.log file
-
-// Below are just some silly menus to demonstrate writing your
-// own configuration file.
-
-// Make some menus...
-menu apps {
- xterm exec "xterm"
- "Emacs" exec "emacs"
- notepad exec notepad
- xload exec "xload -display %display%" # Comment
-}
-
-menu root {
-// Comments fit here, too...
- "Reload .XWinrc" RELOAD
- "Applications" menu apps
- SEParATOR
-}
-
-menu aot {
- Separator
- "Always on Top" alwaysontop
-}
-
-menu xtermspecial {
- "Emacs" exec "emacs"
- "Always on Top" alwaysontop
- SepArAtor
-}
-
-RootMenu root
-
-DefaultSysMenu aot atend
-
-SysMenu {
- "xterm" xtermspecial atstart
-}
-
-# IconDirectory "c:\winnt\"
-
-# DefaultIcon "reinstall.ico"
-
-# Icons {
-# "xterm" "uninstall.ico"
-# }
-
-SilentExit
-
-DEBUG "Done parsing the configuration file..."
-
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index e5b2dc1e0..a3809034e 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -119,8 +119,7 @@ winClipboardProc (void *pvNotUsed)
/* See if X supports the current locale */
if (XSupportsLocale () == False)
{
- ErrorF ("winClipboardProc - Locale not supported by X. Exiting.\n");
- pthread_exit (NULL);
+ ErrorF ("winClipboardProc - Warning: Locale not supported by X.\n");
}
/* Set jump point for Error exits */
diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c
index ce98162ef..7f1935a5d 100644
--- a/xorg-server/hw/xwin/wincursor.c
+++ b/xorg-server/hw/xwin/wincursor.c
@@ -188,8 +188,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
if (pScreenPriv->cursor.sm_cx < pCursor->bits->width ||
pScreenPriv->cursor.sm_cy < pCursor->bits->height)
{
- winErrorFVerb (2, "winLoadCursor - Windows requires %dx%d cursor\n"
- "\tbut X requires %dx%d\n",
+ winErrorFVerb (3, "winLoadCursor - Windows requires %dx%d cursor but X requires %dx%d\n",
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
pCursor->bits->width, pCursor->bits->height);
}
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index 582b865f5..a8153535f 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -116,8 +116,8 @@ winDrawURLWindow (LPARAM lParam)
crText = RGB(0,0,128+64);
SetTextColor (draw->hDC, crText);
- /* Create underlined font 14 high, standard dialog font */
- font = CreateFont (-14, 0, 0, 0, FW_NORMAL, FALSE, TRUE, FALSE,
+ /* Create font 8 high, standard dialog font */
+ font = CreateFont (-8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,
0, 0, 0, 0, 0, "MS Sans Serif");
if (!font)
{
@@ -705,7 +705,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
case ID_ABOUT_WEBSITE:
{
- const char * pszPath = "http://x.cygwin.com/";
+ const char * pszPath = __VENDORDWEBSUPPORT__;
int iReturn;
iReturn = ShellExecute (NULL,
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c
index 72ee2cfb7..9ed27c3d0 100644
--- a/xorg-server/hw/xwin/winerror.c
+++ b/xorg-server/hw/xwin/winerror.c
@@ -117,6 +117,7 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
"Vendor: %s\n" \
"Release: %d.%d.%d.%d (%d)\n" \
"Contact: %s\n" \
+ "%s\n\n" \
"XWin was started with the following command-line:\n\n" \
"%s\n"
@@ -124,6 +125,7 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
pszErrorF, VENDOR_STRING,
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
VENDOR_CONTACT,
+ BUILDERSTRING,
g_pszCommandLine);
if (!pszMsgBox)
goto winMessageBoxF_Cleanup;
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index 317f14dff..a423b499a 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -273,6 +273,10 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
case DEVICE_ON:
pDevice->on = TRUE;
+
+ // immediately copy the state of this keyboard device to the VCK
+ // (which otherwise happens lazily after the first keypress)
+ CopyKeyClass(pDeviceInt, inputInfo.keyboard);
break;
case DEVICE_CLOSE:
diff --git a/xorg-server/hw/xwin/winmultiwindowshape.c b/xorg-server/hw/xwin/winmultiwindowshape.c
index 44007027a..353235760 100644
--- a/xorg-server/hw/xwin/winmultiwindowshape.c
+++ b/xorg-server/hw/xwin/winmultiwindowshape.c
@@ -71,6 +71,9 @@ winUpdateRgnMultiWindow (WindowPtr pWin)
{
SetWindowRgn (winGetWindowPriv(pWin)->hWnd,
winGetWindowPriv(pWin)->hRgn, TRUE);
+
+ /* The system now owns the region specified by the region handle and will delete it when it is no longer needed. */
+ winGetWindowPriv(pWin)->hRgn = NULL;
}
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 8b91296f7..87ffc6d6b 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -515,6 +515,13 @@ winCreateWindowsWindow (WindowPtr pWin)
iWidth = pWin->drawable.width;
iHeight = pWin->drawable.height;
+ /* ensure window actually ends up somewhere visible */
+ if (iX > GetSystemMetrics (SM_CXVIRTUALSCREEN))
+ iX = CW_USEDEFAULT;
+
+ if (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN))
+ iY = CW_USEDEFAULT;
+
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
if (pDaddy)
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 880ca6a1c..21d913e5e 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -153,7 +153,7 @@ static Bool
InitQueue (WMMsgQueuePtr pQueue);
static void
-GetWindowName (Display * pDpy, Window iWin, char **ppName);
+GetWindowName (Display * pDpy, Window iWin, wchar_t **ppName);
static int
SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData);
@@ -191,7 +191,7 @@ PreserveWin32Stack(WMInfoPtr pWMInfo, Window iWindow, UINT direction);
#endif
static Bool
-CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen);
+CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen, Bool fAllowOtherWM);
static void
winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle);
@@ -416,10 +416,12 @@ InitQueue (WMMsgQueuePtr pQueue)
*/
static void
-GetWindowName (Display *pDisplay, Window iWin, char **ppName)
+GetWindowName (Display *pDisplay, Window iWin, wchar_t **ppName)
{
int nResult, nNum;
char **ppList;
+ char *pszReturnData;
+ int iLen, i;
XTextProperty xtpName;
#if CYGMULTIWINDOW_DEBUG
@@ -438,38 +440,26 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
#endif
return;
}
-
- /* */
- if (xtpName.encoding == XA_STRING)
- {
- /* */
- if (xtpName.value)
- {
- int size = xtpName.nitems * (xtpName.format >> 3);
- *ppName = malloc(size + 1);
- strncpy(*ppName, xtpName.value, size);
- (*ppName)[size] = 0;
- XFree (xtpName.value);
- }
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - XA_STRING %s\n", *ppName);
-#endif
- }
- else
- {
- if (XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
- {
- *ppName = strdup (*ppList);
- XFreeStringList (ppList);
- }
- XFree (xtpName.value);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - %s %s\n",
- XGetAtomName (pDisplay, xtpName.encoding), *ppName);
-#endif
- }
+ if (Xutf8TextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
+ {
+ iLen = 0;
+ for (i = 0; i < nNum; i++) iLen += strlen(ppList[i]);
+ pszReturnData = (char *) malloc (iLen + 1);
+ pszReturnData[0] = '\0';
+ for (i = 0; i < nNum; i++) strcat (pszReturnData, ppList[i]);
+ if (ppList) XFreeStringList (ppList);
+ }
+ else
+ {
+ pszReturnData = (char *) malloc (1);
+ pszReturnData[0] = '\0';
+ }
+ iLen = MultiByteToWideChar (CP_UTF8, 0, pszReturnData, -1, NULL, 0);
+ *ppName = (wchar_t*)malloc(sizeof(wchar_t)*(iLen + 1));
+ MultiByteToWideChar (CP_UTF8, 0, pszReturnData, -1, *ppName, iLen);
+ XFree (xtpName.value);
+ free (pszReturnData);
#if CYGMULTIWINDOW_DEBUG
ErrorF ("GetWindowName - Returning\n");
@@ -506,7 +496,7 @@ SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData)
static void
UpdateName (WMInfoPtr pWMInfo, Window iWindow)
{
- char *pszName;
+ wchar_t *pszName;
Atom atmType;
int fmtRet;
unsigned long items, remain;
@@ -550,7 +540,7 @@ UpdateName (WMInfoPtr pWMInfo, Window iWindow)
&attr);
if (!attr.override_redirect)
{
- SetWindowText (hWnd, pszName);
+ SetWindowTextW (hWnd, pszName);
winUpdateIcon (iWindow);
}
@@ -903,9 +893,7 @@ winMultiWindowXMsgProc (void *pArg)
/* See if X supports the current locale */
if (XSupportsLocale () == False)
{
- ErrorF ("winMultiWindowXMsgProc - Locale not supported by X. "
- "Exiting.\n");
- pthread_exit (NULL);
+ ErrorF ("winMultiWindowXMsgProc - Warning: locale not supported by X\n");
}
/* Release the server started mutex */
@@ -979,7 +967,7 @@ winMultiWindowXMsgProc (void *pArg)
"successfully opened the display.\n");
/* Check if another window manager is already running */
- g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen);
+ g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, pProcArg->pWMInfo->fAllowOtherWM);
if (g_fAnotherWMRunning && !pProcArg->pWMInfo->fAllowOtherWM)
{
@@ -1030,7 +1018,7 @@ winMultiWindowXMsgProc (void *pArg)
if (pProcArg->pWMInfo->fAllowOtherWM && !XPending (pProcArg->pDisplay))
{
- if (CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen))
+ if (CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, TRUE))
{
if (!g_fAnotherWMRunning)
{
@@ -1288,8 +1276,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
/* See if X supports the current locale */
if (XSupportsLocale () == False)
{
- ErrorF ("winInitMultiWindowWM - Locale not supported by X. Exiting.\n");
- pthread_exit (NULL);
+ ErrorF ("winInitMultiWindowWM - Warning: Locale not supported by X.\n");
}
/* Release the server started mutex */
@@ -1509,7 +1496,7 @@ winRedirectErrorHandler (Display *pDisplay, XErrorEvent *pErr)
*/
static Bool
-CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen)
+CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen, Bool fAllowOtherWM)
{
/*
Try to select the events which only one client at a time is allowed to select.
@@ -1524,8 +1511,12 @@ CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen)
/*
Side effect: select the events we are actually interested in...
+
+ If other WMs are not allowed, also select one of the events which only one client
+ at a time is allowed to select, so other window managers won't start...
*/
- XSelectInput(pDisplay, RootWindow (pDisplay, dwScreen), SubstructureNotifyMask);
+ XSelectInput(pDisplay, RootWindow (pDisplay, dwScreen),
+ SubstructureNotifyMask | ( !fAllowOtherWM ? ButtonPressMask : 0));
XSync (pDisplay, 0);
return redirectError;
}
@@ -1546,6 +1537,7 @@ winDeinitMultiWindowWM (void)
#define HINT_BORDER (1L<<1)
#define HINT_SIZEBOX (1l<<2)
#define HINT_CAPTION (1l<<3)
+#define HINT_NOMAXIMIZE (1L<<4)
/* These two are used on their own */
#define HINT_MAX (1L<<0)
#define HINT_MIN (1L<<1)
@@ -1627,7 +1619,32 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (pAtom) XFree(pAtom);
}
- /* Apply Styles, overriding hint settings from above */
+ {
+ XSizeHints *normal_hint = XAllocSizeHints();
+ long supplied;
+ if (normal_hint && (XGetWMNormalHints(pDisplay, iWindow, normal_hint, &supplied) == Success))
+ {
+ if (normal_hint->flags & PMaxSize)
+ {
+ /* Not maximizable if a maximum size is specified */
+ hint |= HINT_NOMAXIMIZE;
+
+ if (normal_hint->flags & PMinSize)
+ {
+ /*
+ If both minimum size and maximum size are specified and are the same,
+ don't bother with a resizing frame
+ */
+ if ((normal_hint->min_width == normal_hint->max_width)
+ && (normal_hint->min_height == normal_hint->max_height))
+ hint = (hint & ~HINT_SIZEBOX);
+ }
+ }
+ }
+ XFree(normal_hint);
+ }
+
+ /* Override hint settings from above with settings from config file */
style = winOverrideStyle((unsigned long)pWin);
if (style & STYLE_TOPMOST) *zstyle = HWND_TOPMOST;
else if (style & STYLE_MAXIMIZE) maxmin = (hint & ~HINT_MIN) | HINT_MAX;
@@ -1644,14 +1661,21 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
else if (style & STYLE_NOFRAME)
hint = (hint & ~HINT_BORDER & ~HINT_CAPTION & ~HINT_SIZEBOX) | HINT_NOFRAME;
+ /* Now apply styles to window */
style = GetWindowLongPtr(hWnd, GWL_STYLE) & ~WS_CAPTION & ~WS_SIZEBOX; /* Just in case */
if (!style) return;
- if (!hint) /* All on, but no resize of children is allowed */
- style = style | WS_CAPTION | (GetParent(hWnd) ? 0 : WS_SIZEBOX);
- else if (hint & HINT_NOFRAME); /* All off, so do nothing */
+
+ if (!hint) /* All on */
+ style = style | WS_CAPTION | WS_SIZEBOX;
+ else if (hint & HINT_NOFRAME) /* All off */
+ style = style & ~WS_CAPTION & ~WS_SIZEBOX;
else style = style | ((hint & HINT_BORDER) ? WS_BORDER : 0) |
- ((hint & HINT_SIZEBOX) ? (GetParent(hWnd) ? 0 : WS_SIZEBOX) : 0) |
+ ((hint & HINT_SIZEBOX) ? WS_SIZEBOX : 0) |
((hint & HINT_CAPTION) ? WS_CAPTION : 0);
+
+ if (hint & HINT_NOMAXIMIZE)
+ style = style & ~WS_MAXIMIZEBOX;
+
SetWindowLongPtr (hWnd, GWL_STYLE, style);
}
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index d5bceb928..93901cac7 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -723,7 +723,7 @@ winIconIsOverride(unsigned hiconIn)
/*
- * Try and open ~/.XWinrc and /usr/X11R6/lib/X11/system.XWinrc
+ * Try and open ~/.XWinrc and system.XWinrc
* Load it into prefs structure for use by other functions
*/
void
@@ -763,7 +763,7 @@ LoadPreferences (void)
#ifdef RELOCATE_PROJECTROOT
snprintf(buffer, sizeof(buffer), "%s\\system.XWinrc", winGetBaseDir());
#else
- strncpy(buffer, PROJECTROOT"/lib/X11/system.XWinrc", sizeof(buffer));
+ strncpy(buffer, SYSCONFDIR"/X11/system.XWinrc", sizeof(buffer));
#endif
buffer[sizeof(buffer)-1] = 0;
prefFile = fopen (buffer, "r");
diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l
index 9a384a2cd..463dff4ca 100644
--- a/xorg-server/hw/xwin/winprefslex.l
+++ b/xorg-server/hw/xwin/winprefslex.l
@@ -88,7 +88,7 @@ ATSTART { return ATSTART; }
ATEND { return ATEND; }
EXEC { return EXEC; }
ALWAYSONTOP { return ALWAYSONTOP; }
-DEBUG { return DEBUG; }
+DEBUG { return DEBUGOUTPUT; }
RELOAD { return RELOAD; }
TRAYICON { return TRAYICON; }
SILENTEXIT { return SILENTEXIT; }
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 73f165915..0acf160e4 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -115,7 +115,7 @@ extern int yylex(void);
%token ATEND
%token EXEC
%token ALWAYSONTOP
-%token DEBUG
+%token DEBUGOUTPUT "DEBUG"
%token RELOAD
%token TRAYICON
%token FORCEEXIT
@@ -243,7 +243,7 @@ forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
;
-debug: DEBUG STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); }
+debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); }
;
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index fd7719c3a..159e53333 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -1556,6 +1556,7 @@ winLogVersionInfo (void)
ErrorF ("Welcome to the XWin X Server\n");
ErrorF ("Vendor: %s\n", VENDOR_STRING);
ErrorF ("Release: %d.%d.%d.%d (%d)\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT);
+ ErrorF ("%s\n\n", BUILDERSTRING);
ErrorF ("Contact: %s\n", VENDOR_CONTACT);
}
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index 86c094334..cf2f93f0a 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -43,6 +43,7 @@
#ifndef PROJECT_NAME
# define PROJECT_NAME "Cygwin/X"
#endif
+#define EXECUTABLE_NAME "XWin"
#define WINDOW_CLASS "cygwin/x"
#define WINDOW_TITLE PROJECT_NAME ":%s.%d"
#define WINDOW_TITLE_XDMCP "%s:%s.%d"