aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-08 14:29:46 +0200
committermarha <marha@users.sourceforge.net>2012-06-08 14:50:37 +0200
commit72ec0e3bb2d7fc6b77b2a75873792f781679da6a (patch)
tree0a736ab9a8c26276929ab077dc661e3625b54884 /xorg-server/hw/xwin
parent5e865910f0ce672295bd60460631339be5e311a0 (diff)
parent990bc3f015a4f8fce2eb918375defcd44980a845 (diff)
downloadvcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.gz
vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.bz2
vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.zip
Merge remote-tracking branch 'origin/released'
Conflicts: fontconfig/.gitignore libX11/src/ConvSel.c libX11/src/CrGlCur.c libX11/src/CrWindow.c libX11/src/GetDflt.c libX11/src/Window.c libX11/src/xlibi18n/XimProto.h libX11/src/xlibi18n/lcDynamic.c libxcb/src/.gitignore libxcb/src/xcb_ext.c libxcb/src/xcb_xid.c mesalib/src/glsl/.gitignore mesalib/src/glsl/glcpp/.gitignore mesalib/src/mapi/glapi/gen/glX_API.xml mesalib/src/mapi/glapi/glapi_getproc.c mesalib/src/mesa/main/.gitignore mesalib/src/mesa/main/syncobj.c mesalib/src/mesa/program/.gitignore xkbcomp/listing.c xkbcomp/xkbpath.c xorg-server/.gitignore xorg-server/Xext/xvmain.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/glx/winpriv.h xorg-server/hw/xwin/winprefsyacc.y xorg-server/hw/xwin/winscrinit.c xorg-server/xkeyboard-config/rules/bin/ml1_s.sh xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh xorg-server/xkeyboard-config/rules/bin/ml_s.sh xorg-server/xkeyboard-config/rules/bin/mlv_s.sh xorg-server/xkeyboard-config/rules/compat/.gitignore
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/.gitignore3
-rw-r--r--xorg-server/hw/xwin/README282
-rw-r--r--xorg-server/hw/xwin/glx/.gitignore3
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.h26
-rw-r--r--xorg-server/hw/xwin/system.XWinrc256
-rw-r--r--xorg-server/hw/xwin/win.h11
-rw-r--r--xorg-server/hw/xwin/winblock.c6
-rw-r--r--xorg-server/hw/xwin/winnativegdi.c4
-rw-r--r--xorg-server/hw/xwin/winpfbdd.c6
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y920
-rw-r--r--xorg-server/hw/xwin/winscrinit.c14
-rw-r--r--xorg-server/hw/xwin/winshaddd.c6
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c6
-rw-r--r--xorg-server/hw/xwin/winshadgdi.c6
-rw-r--r--xorg-server/hw/xwin/winwakeup.c4
15 files changed, 777 insertions, 776 deletions
diff --git a/xorg-server/hw/xwin/.gitignore b/xorg-server/hw/xwin/.gitignore
new file mode 100644
index 000000000..bc4986cb4
--- /dev/null
+++ b/xorg-server/hw/xwin/.gitignore
@@ -0,0 +1,3 @@
+winprefslex.c
+winprefsyacc.c
+winprefsyacc.h
diff --git a/xorg-server/hw/xwin/README b/xorg-server/hw/xwin/README
index 219fd1337..9f7090344 100644
--- a/xorg-server/hw/xwin/README
+++ b/xorg-server/hw/xwin/README
@@ -1,141 +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 <cygwin-xfree@cygwin.com>
-
-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 <cygwin-xfree@cygwin.com>
-
-The hardware accelerated OpenGL was tested using:
-
- o glxgears
- o glxinfo
- o blender
- o tuxkart
- o GLUT demos (some did fail)
-
+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 <cygwin-xfree@cygwin.com>
+
+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 <cygwin-xfree@cygwin.com>
+
+The hardware accelerated OpenGL was tested using:
+
+ o glxgears
+ o glxinfo
+ o blender
+ o tuxkart
+ o GLUT demos (some did fail)
+
diff --git a/xorg-server/hw/xwin/glx/.gitignore b/xorg-server/hw/xwin/glx/.gitignore
new file mode 100644
index 000000000..062fd8573
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/.gitignore
@@ -0,0 +1,3 @@
+# ignore generated files
+generated_gl_wrappers.c
+generated_wgl_wrappers.c
diff --git a/xorg-server/hw/xwin/glx/winpriv.h b/xorg-server/hw/xwin/glx/winpriv.h
index 710525ccc..8cac86caf 100644
--- a/xorg-server/hw/xwin/glx/winpriv.h
+++ b/xorg-server/hw/xwin/glx/winpriv.h
@@ -1,13 +1,13 @@
-/*
- * Export window information for the Windows-OpenGL GLX implementation.
- *
- * Authors: Alexander Gottwald
- */
-
-#include <X11/Xwindows.h>
-#include <windowstr.h>
-
-#define WIN_GL_WINDOW_CLASS "XWinGLTest"
-
-HWND winGetWindowInfo(WindowPtr pWin);
-Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen);
+/*
+ * Export window information for the Windows-OpenGL GLX implementation.
+ *
+ * Authors: Alexander Gottwald
+ */
+
+#include <X11/Xwindows.h>
+#include <windowstr.h>
+
+#define WIN_GL_WINDOW_CLASS "XWinGLTest"
+
+HWND winGetWindowInfo(WindowPtr pWin);
+Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen);
diff --git a/xorg-server/hw/xwin/system.XWinrc b/xorg-server/hw/xwin/system.XWinrc
index f0771c610..267809145 100644
--- a/xorg-server/hw/xwin/system.XWinrc
+++ b/xorg-server/hw/xwin/system.XWinrc
@@ -1,128 +1,128 @@
-# XWin Server Resource File - EXAMPLE
-# Earle F. Philhower, III
-
-# Place in ~/.XWinrc or in /etc/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)
-# (This should only rarely be needed as
-# the DISPLAY environment variable is also
-# set correctly)
-# 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..."
-
+# XWin Server Resource File - EXAMPLE
+# Earle F. Philhower, III
+
+# Place in ~/.XWinrc or in /etc/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)
+# (This should only rarely be needed as
+# the DISPLAY environment variable is also
+# set correctly)
+# 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/win.h b/xorg-server/hw/xwin/win.h
index 8c7df4cac..b49859ddc 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -236,7 +236,7 @@ typedef void (*winShadowUpdateProcPtr) (ScreenPtr, shadowBufPtr);
typedef Bool (*winInitScreenProcPtr) (ScreenPtr);
-typedef Bool (*winCloseScreenProcPtr) (int, ScreenPtr);
+typedef Bool (*winCloseScreenProcPtr) (ScreenPtr);
typedef Bool (*winInitVisualsProcPtr) (ScreenPtr);
@@ -745,8 +745,8 @@ void winSetAuthorization(void);
void
-winBlockHandler(int nScreen,
- pointer pBlockData, pointer pTimeout, pointer pReadMask);
+winBlockHandler(ScreenPtr pScreen,
+ pointer pTimeout, pointer pReadMask);
#ifdef XWIN_NATIVEGDI
/*
@@ -1039,7 +1039,7 @@ winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable,
*/
Bool
- winScreenInit(int index, ScreenPtr pScreen, int argc, char **argv);
+ winScreenInit(ScreenPtr pScreen, int argc, char **argv);
Bool
winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv);
@@ -1091,8 +1091,7 @@ Bool
void
-winWakeupHandler(int nScreen,
- pointer pWakeupData,
+winWakeupHandler(ScreenPtr pScreen,
unsigned long ulResult, pointer pReadmask);
/*
diff --git a/xorg-server/hw/xwin/winblock.c b/xorg-server/hw/xwin/winblock.c
index c18d080fa..c1a6e705a 100644
--- a/xorg-server/hw/xwin/winblock.c
+++ b/xorg-server/hw/xwin/winblock.c
@@ -36,11 +36,11 @@
/* See Porting Layer Definition - p. 6 */
void
-winBlockHandler(int nScreen,
- pointer pBlockData, pointer pTimeout, pointer pReadMask)
+winBlockHandler(ScreenPtr pScreen,
+ pointer pTimeout, pointer pReadMask)
{
#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
- winScreenPriv((ScreenPtr) pBlockData);
+ winScreenPriv(pScreen);
#endif
MSG msg;
diff --git a/xorg-server/hw/xwin/winnativegdi.c b/xorg-server/hw/xwin/winnativegdi.c
index 88cc52976..3cd565313 100644
--- a/xorg-server/hw/xwin/winnativegdi.c
+++ b/xorg-server/hw/xwin/winnativegdi.c
@@ -44,7 +44,7 @@ static void
winShadowUpdateNativeGDI(ScreenPtr pScreen, shadowBufPtr pBuf);
static Bool
- winCloseScreenNativeGDI(int nIndex, ScreenPtr pScreen);
+ winCloseScreenNativeGDI(ScreenPtr pScreen);
static Bool
winInitVisualsNativeGDI(ScreenPtr pScreen);
@@ -104,7 +104,7 @@ winInitScreenNativeGDI(ScreenPtr pScreen)
*/
static Bool
-winCloseScreenNativeGDI(int nIndex, ScreenPtr pScreen)
+winCloseScreenNativeGDI(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
diff --git a/xorg-server/hw/xwin/winpfbdd.c b/xorg-server/hw/xwin/winpfbdd.c
index d9b095f3a..e2ed49af8 100644
--- a/xorg-server/hw/xwin/winpfbdd.c
+++ b/xorg-server/hw/xwin/winpfbdd.c
@@ -44,7 +44,7 @@ static Bool
winAllocateFBPrimaryDD(ScreenPtr pScreen);
static Bool
- winCloseScreenPrimaryDD(int nIndex, ScreenPtr pScreen);
+ winCloseScreenPrimaryDD(ScreenPtr pScreen);
static Bool
winInitVisualsPrimaryDD(ScreenPtr pScreen);
@@ -264,7 +264,7 @@ winInitScreenPrimaryDD(ScreenPtr pScreen)
*/
static Bool
-winCloseScreenPrimaryDD(int nIndex, ScreenPtr pScreen)
+winCloseScreenPrimaryDD(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
@@ -279,7 +279,7 @@ winCloseScreenPrimaryDD(int nIndex, ScreenPtr pScreen)
/* Call the wrapped CloseScreen procedure */
WIN_UNWRAP(CloseScreen);
if (pScreen->CloseScreen)
- fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
+ fReturn = (*pScreen->CloseScreen) (pScreen);
/* Delete the window property */
RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP);
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index d28fbeb8f..b9e961622 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -1,460 +1,460 @@
-%{
-/*
- * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- * Copyright (C) Colin Harrison 2005-2008
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * 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 XFREE86 PROJECT 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 XFree86 Project
- * 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 XFree86 Project.
- *
- * Authors: Earle F. Philhower, III
- * Colin Harrison
- */
-/* $XFree86: $ */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "winprefs.h"
-#include "winmsg.h"
-
-/* The following give better error messages in bison at the cost of a few KB */
-#define YYERROR_VERBOSE 1
-
-/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
-#define YYLTYPE_IS_TRIVIAL 1
-#define YYENABLE_NLS 0
-
-/* The global pref settings */
-WINPREFS pref;
-
-/* The working menu */
-static MENUPARSED menu;
-
-/* Functions for parsing the tokens into out structure */
-/* Defined at the end section of this file */
-
-static void SetIconDirectory (char *path);
-static void SetDefaultIcon (char *fname);
-static void SetRootMenu (char *menu);
-static void SetDefaultSysMenu (char *menu, int pos);
-static void SetTrayIcon (char *fname);
-
-static void OpenMenu(char *menuname);
-static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
-static void CloseMenu(void);
-
-static void OpenIcons(void);
-static void AddIconLine(char *matchstr, char *iconfile);
-static void CloseIcons(void);
-
-static void OpenStyles(void);
-static void AddStyleLine(char *matchstr, unsigned long style);
-static void CloseStyles(void);
-
-static void OpenSysMenu(void);
-static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
-static void CloseSysMenu(void);
-
-static int yyerror (char *s);
-
-extern char *yytext;
-extern int yylex(void);
-
-#define YYMALLOC malloc
-#define YYFREE free
-
-%}
-
-%union {
- char *sVal;
- unsigned long uVal;
- int iVal;
-}
-
-%token NEWLINE
-%token MENU
-%token LB
-%token RB
-%token ICONDIRECTORY
-%token DEFAULTICON
-%token ICONS
-%token STYLES
-%token TOPMOST
-%token MAXIMIZE
-%token MINIMIZE
-%token BOTTOM
-%token NOTITLE
-%token OUTLINE
-%token NOFRAME
-%token DEFAULTSYSMENU
-%token SYSMENU
-%token ROOTMENU
-%token SEPARATOR
-%token ATSTART
-%token ATEND
-%token EXEC
-%token ALWAYSONTOP
-%token DEBUGOUTPUT "DEBUG"
-%token RELOAD
-%token TRAYICON
-%token FORCEEXIT
-%token SILENTEXIT
-
-%token <sVal> STRING
-%type <uVal> group1
-%type <uVal> group2
-%type <uVal> stylecombo
-%type <iVal> atspot
-
-%%
-
-input: /* empty */
- | input line
- ;
-
-line: NEWLINE
- | command
- ;
-
-
-newline_or_nada:
- | NEWLINE newline_or_nada
- ;
-
-command: defaulticon
- | icondirectory
- | menu
- | icons
- | styles
- | sysmenu
- | rootmenu
- | defaultsysmenu
- | debug
- | trayicon
- | forceexit
- | silentexit
- ;
-
-trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); }
- ;
-
-rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); }
- ;
-
-defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); }
- ;
-
-defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); }
- ;
-
-icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); }
- ;
-
-menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); }
- | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); }
- | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); }
- | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); }
- | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); }
- ;
-
-menulist: menuline
- | menuline menulist
- ;
-
-menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();}
- ;
-
-iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); }
- ;
-
-iconlist: iconline
- | iconline iconlist
- ;
-
-icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();}
- ;
-
-group1: TOPMOST { $$=STYLE_TOPMOST; }
- | MAXIMIZE { $$=STYLE_MAXIMIZE; }
- | MINIMIZE { $$=STYLE_MINIMIZE; }
- | BOTTOM { $$=STYLE_BOTTOM; }
- ;
-
-group2: NOTITLE { $$=STYLE_NOTITLE; }
- | OUTLINE { $$=STYLE_OUTLINE; }
- | NOFRAME { $$=STYLE_NOFRAME; }
- ;
-
-stylecombo: group1 { $$=$1; }
- | group2 { $$=$1; }
- | group1 group2 { $$=$1|$2; }
- | group2 group1 { $$=$1|$2; }
- ;
-
-styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); }
- ;
-
-stylelist: styleline
- | styleline stylelist
- ;
-
-styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
- ;
-
-atspot: { $$=AT_END; }
- | ATSTART { $$=AT_START; }
- | ATEND { $$=AT_END; }
- ;
-
-sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); }
- ;
-
-sysmenulist: sysmenuline
- | sysmenuline sysmenulist
- ;
-
-sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();}
- ;
-
-forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
- ;
-
-silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
- ;
-
-debug: DEBUGOUTPUT STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free($2); }
- ;
-
-
-%%
-/*
- * Errors in parsing abort and print log messages
- */
-static int
-yyerror (char *s)
-{
- extern int yylineno; /* Handled by flex internally */
-
- ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
- return 1;
-}
-
-/* Miscellaneous functions to store TOKENs into the structure */
-static void
-SetIconDirectory (char *path)
-{
- strncpy (pref.iconDirectory, path, PATH_MAX);
- pref.iconDirectory[PATH_MAX] = 0;
-}
-
-static void
-SetDefaultIcon (char *fname)
-{
- strncpy (pref.defaultIconName, fname, NAME_MAX);
- pref.defaultIconName[NAME_MAX] = 0;
-}
-
-static void
-SetTrayIcon (char *fname)
-{
- strncpy (pref.trayIconName, fname, NAME_MAX);
- pref.trayIconName[NAME_MAX] = 0;
-}
-
-static void
-SetRootMenu (char *menu)
-{
- strncpy (pref.rootMenuName, menu, MENU_MAX);
- pref.rootMenuName[MENU_MAX] = 0;
-}
-
-static void
-SetDefaultSysMenu (char *menu, int pos)
-{
- strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
- pref.defaultSysMenuName[MENU_MAX] = 0;
- pref.defaultSysMenuPos = pos;
-}
-
-static void
-OpenMenu (char *menuname)
-{
- if (menu.menuItem) free(menu.menuItem);
- menu.menuItem = NULL;
- strncpy(menu.menuName, menuname, MENU_MAX);
- menu.menuName[MENU_MAX] = 0;
- menu.menuItems = 0;
-}
-
-static void
-AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
-{
- if (menu.menuItem==NULL)
- menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
- else
- menu.menuItem = (MENUITEM*)
- realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
-
- strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
- menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
-
- menu.menuItem[menu.menuItems].cmd = cmd;
-
- strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
- menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
-
- menu.menuItem[menu.menuItems].commandID = 0;
-
- menu.menuItems++;
-}
-
-static void
-CloseMenu (void)
-{
- if (menu.menuItem==NULL || menu.menuItems==0)
- {
- ErrorF("LoadPreferences: Empty menu detected\n");
- return;
- }
-
- if (pref.menuItems)
- pref.menu = (MENUPARSED*)
- realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
- else
- pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
-
- memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
- pref.menuItems++;
-
- memset (&menu, 0, sizeof(MENUPARSED));
-}
-
-static void
-OpenIcons (void)
-{
- if (pref.icon != NULL) {
- winDebug("LoadPreferences: Redefining icon mappings\n");
- free(pref.icon);
- pref.icon = NULL;
- }
- pref.iconItems = 0;
-}
-
-static void
-AddIconLine (char *matchstr, char *iconfile)
-{
- if (pref.icon==NULL)
- pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
- else
- pref.icon = (ICONITEM*)
- realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
-
- strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
- pref.icon[pref.iconItems].match[MENU_MAX] = 0;
-
- strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
- pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
-
- pref.icon[pref.iconItems].hicon = 0;
-
- pref.iconItems++;
-}
-
-static void
-CloseIcons (void)
-{
-}
-
-static void
-OpenStyles (void)
-{
- if (pref.style != NULL) {
- winDebug("LoadPreferences: Redefining window style\n");
- free(pref.style);
- pref.style = NULL;
- }
- pref.styleItems = 0;
-}
-
-static void
-AddStyleLine (char *matchstr, unsigned long style)
-{
- if (pref.style==NULL)
- pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
- else
- pref.style = (STYLEITEM*)
- realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
-
- strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
- pref.style[pref.styleItems].match[MENU_MAX] = 0;
-
- pref.style[pref.styleItems].type = style;
-
- pref.styleItems++;
-}
-
-static void
-CloseStyles (void)
-{
-}
-
-static void
-OpenSysMenu (void)
-{
- if (pref.sysMenu != NULL) {
- winDebug("LoadPreferences: Redefining system menu\n");
- free(pref.sysMenu);
- pref.sysMenu = NULL;
- }
- pref.sysMenuItems = 0;
-}
-
-static void
-AddSysMenuLine (char *matchstr, char *menuname, int pos)
-{
- if (pref.sysMenu==NULL)
- pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
- else
- pref.sysMenu = (SYSMENUITEM*)
- realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
-
- strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
-
- strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
-
- pref.sysMenu[pref.sysMenuItems].menuPos = pos;
-
- pref.sysMenuItems++;
-}
-
-static void
-CloseSysMenu (void)
-{
-}
-
+%{
+/*
+ * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
+ * Copyright (C) Colin Harrison 2005-2008
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * 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 XFREE86 PROJECT 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 XFree86 Project
+ * 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 XFree86 Project.
+ *
+ * Authors: Earle F. Philhower, III
+ * Colin Harrison
+ */
+/* $XFree86: $ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "winprefs.h"
+#include "winmsg.h"
+
+/* The following give better error messages in bison at the cost of a few KB */
+#define YYERROR_VERBOSE 1
+
+/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
+#define YYLTYPE_IS_TRIVIAL 1
+#define YYENABLE_NLS 0
+
+/* The global pref settings */
+WINPREFS pref;
+
+/* The working menu */
+static MENUPARSED menu;
+
+/* Functions for parsing the tokens into out structure */
+/* Defined at the end section of this file */
+
+static void SetIconDirectory (char *path);
+static void SetDefaultIcon (char *fname);
+static void SetRootMenu (char *menu);
+static void SetDefaultSysMenu (char *menu, int pos);
+static void SetTrayIcon (char *fname);
+
+static void OpenMenu(char *menuname);
+static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
+static void CloseMenu(void);
+
+static void OpenIcons(void);
+static void AddIconLine(char *matchstr, char *iconfile);
+static void CloseIcons(void);
+
+static void OpenStyles(void);
+static void AddStyleLine(char *matchstr, unsigned long style);
+static void CloseStyles(void);
+
+static void OpenSysMenu(void);
+static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
+static void CloseSysMenu(void);
+
+static int yyerror (char *s);
+
+extern char *yytext;
+extern int yylex(void);
+
+#define YYMALLOC malloc
+#define YYFREE free
+
+%}
+
+%union {
+ char *sVal;
+ unsigned long uVal;
+ int iVal;
+}
+
+%token NEWLINE
+%token MENU
+%token LB
+%token RB
+%token ICONDIRECTORY
+%token DEFAULTICON
+%token ICONS
+%token STYLES
+%token TOPMOST
+%token MAXIMIZE
+%token MINIMIZE
+%token BOTTOM
+%token NOTITLE
+%token OUTLINE
+%token NOFRAME
+%token DEFAULTSYSMENU
+%token SYSMENU
+%token ROOTMENU
+%token SEPARATOR
+%token ATSTART
+%token ATEND
+%token EXEC
+%token ALWAYSONTOP
+%token DEBUGOUTPUT "DEBUG"
+%token RELOAD
+%token TRAYICON
+%token FORCEEXIT
+%token SILENTEXIT
+
+%token <sVal> STRING
+%type <uVal> group1
+%type <uVal> group2
+%type <uVal> stylecombo
+%type <iVal> atspot
+
+%%
+
+input: /* empty */
+ | input line
+ ;
+
+line: NEWLINE
+ | command
+ ;
+
+
+newline_or_nada:
+ | NEWLINE newline_or_nada
+ ;
+
+command: defaulticon
+ | icondirectory
+ | menu
+ | icons
+ | styles
+ | sysmenu
+ | rootmenu
+ | defaultsysmenu
+ | debug
+ | trayicon
+ | forceexit
+ | silentexit
+ ;
+
+trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); }
+ ;
+
+rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); }
+ ;
+
+defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); }
+ ;
+
+defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); }
+ ;
+
+icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); }
+ ;
+
+menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); }
+ | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); }
+ | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); }
+ | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); }
+ | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); }
+ ;
+
+menulist: menuline
+ | menuline menulist
+ ;
+
+menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();}
+ ;
+
+iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); }
+ ;
+
+iconlist: iconline
+ | iconline iconlist
+ ;
+
+icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();}
+ ;
+
+group1: TOPMOST { $$=STYLE_TOPMOST; }
+ | MAXIMIZE { $$=STYLE_MAXIMIZE; }
+ | MINIMIZE { $$=STYLE_MINIMIZE; }
+ | BOTTOM { $$=STYLE_BOTTOM; }
+ ;
+
+group2: NOTITLE { $$=STYLE_NOTITLE; }
+ | OUTLINE { $$=STYLE_OUTLINE; }
+ | NOFRAME { $$=STYLE_NOFRAME; }
+ ;
+
+stylecombo: group1 { $$=$1; }
+ | group2 { $$=$1; }
+ | group1 group2 { $$=$1|$2; }
+ | group2 group1 { $$=$1|$2; }
+ ;
+
+styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); }
+ ;
+
+stylelist: styleline
+ | styleline stylelist
+ ;
+
+styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
+ ;
+
+atspot: { $$=AT_END; }
+ | ATSTART { $$=AT_START; }
+ | ATEND { $$=AT_END; }
+ ;
+
+sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); }
+ ;
+
+sysmenulist: sysmenuline
+ | sysmenuline sysmenulist
+ ;
+
+sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();}
+ ;
+
+forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
+ ;
+
+silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
+ ;
+
+debug: DEBUGOUTPUT STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free($2); }
+ ;
+
+
+%%
+/*
+ * Errors in parsing abort and print log messages
+ */
+static int
+yyerror (char *s)
+{
+ extern int yylineno; /* Handled by flex internally */
+
+ ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
+ return 1;
+}
+
+/* Miscellaneous functions to store TOKENs into the structure */
+static void
+SetIconDirectory (char *path)
+{
+ strncpy (pref.iconDirectory, path, PATH_MAX);
+ pref.iconDirectory[PATH_MAX] = 0;
+}
+
+static void
+SetDefaultIcon (char *fname)
+{
+ strncpy (pref.defaultIconName, fname, NAME_MAX);
+ pref.defaultIconName[NAME_MAX] = 0;
+}
+
+static void
+SetTrayIcon (char *fname)
+{
+ strncpy (pref.trayIconName, fname, NAME_MAX);
+ pref.trayIconName[NAME_MAX] = 0;
+}
+
+static void
+SetRootMenu (char *menu)
+{
+ strncpy (pref.rootMenuName, menu, MENU_MAX);
+ pref.rootMenuName[MENU_MAX] = 0;
+}
+
+static void
+SetDefaultSysMenu (char *menu, int pos)
+{
+ strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
+ pref.defaultSysMenuName[MENU_MAX] = 0;
+ pref.defaultSysMenuPos = pos;
+}
+
+static void
+OpenMenu (char *menuname)
+{
+ if (menu.menuItem) free(menu.menuItem);
+ menu.menuItem = NULL;
+ strncpy(menu.menuName, menuname, MENU_MAX);
+ menu.menuName[MENU_MAX] = 0;
+ menu.menuItems = 0;
+}
+
+static void
+AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
+{
+ if (menu.menuItem==NULL)
+ menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
+ else
+ menu.menuItem = (MENUITEM*)
+ realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
+
+ strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
+ menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
+
+ menu.menuItem[menu.menuItems].cmd = cmd;
+
+ strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
+ menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
+
+ menu.menuItem[menu.menuItems].commandID = 0;
+
+ menu.menuItems++;
+}
+
+static void
+CloseMenu (void)
+{
+ if (menu.menuItem==NULL || menu.menuItems==0)
+ {
+ ErrorF("LoadPreferences: Empty menu detected\n");
+ return;
+ }
+
+ if (pref.menuItems)
+ pref.menu = (MENUPARSED*)
+ realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
+ else
+ pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
+
+ memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
+ pref.menuItems++;
+
+ memset (&menu, 0, sizeof(MENUPARSED));
+}
+
+static void
+OpenIcons (void)
+{
+ if (pref.icon != NULL) {
+ winDebug("LoadPreferences: Redefining icon mappings\n");
+ free(pref.icon);
+ pref.icon = NULL;
+ }
+ pref.iconItems = 0;
+}
+
+static void
+AddIconLine (char *matchstr, char *iconfile)
+{
+ if (pref.icon==NULL)
+ pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
+ else
+ pref.icon = (ICONITEM*)
+ realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
+
+ strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
+ pref.icon[pref.iconItems].match[MENU_MAX] = 0;
+
+ strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
+ pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
+
+ pref.icon[pref.iconItems].hicon = 0;
+
+ pref.iconItems++;
+}
+
+static void
+CloseIcons (void)
+{
+}
+
+static void
+OpenStyles (void)
+{
+ if (pref.style != NULL) {
+ winDebug("LoadPreferences: Redefining window style\n");
+ free(pref.style);
+ pref.style = NULL;
+ }
+ pref.styleItems = 0;
+}
+
+static void
+AddStyleLine (char *matchstr, unsigned long style)
+{
+ if (pref.style==NULL)
+ pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
+ else
+ pref.style = (STYLEITEM*)
+ realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
+
+ strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
+ pref.style[pref.styleItems].match[MENU_MAX] = 0;
+
+ pref.style[pref.styleItems].type = style;
+
+ pref.styleItems++;
+}
+
+static void
+CloseStyles (void)
+{
+}
+
+static void
+OpenSysMenu (void)
+{
+ if (pref.sysMenu != NULL) {
+ winDebug("LoadPreferences: Redefining system menu\n");
+ free(pref.sysMenu);
+ pref.sysMenu = NULL;
+ }
+ pref.sysMenuItems = 0;
+}
+
+static void
+AddSysMenuLine (char *matchstr, char *menuname, int pos)
+{
+ if (pref.sysMenu==NULL)
+ pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
+ else
+ pref.sysMenu = (SYSMENUITEM*)
+ realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
+
+ strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
+ pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
+
+ strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
+ pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
+
+ pref.sysMenu[pref.sysMenuItems].menuPos = pos;
+
+ pref.sysMenuItems++;
+}
+
+static void
+CloseSysMenu (void)
+{
+}
+
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index 2b699a84e..d789e563f 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -81,9 +81,9 @@ static Bool
*/
Bool
-winScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
+winScreenInit(ScreenPtr pScreen, int argc, char **argv)
{
- winScreenInfoPtr pScreenInfo = &g_ScreenInfo[index];
+ winScreenInfoPtr pScreenInfo = &g_ScreenInfo[pScreen->myNum];
winPrivScreenPtr pScreenPriv;
HDC hdc;
DWORD dwInitialBPP;
@@ -200,11 +200,11 @@ winScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
miClearVisualTypes();
/* Call the engine dependent screen initialization procedure */
- if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv))) {
+ if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) {
ErrorF("winScreenInit - winFinishScreenInit () failed\n");
/* call the engine dependent screen close procedure to clean up from a failure */
- pScreenPriv->pwinCloseScreen(index, pScreen);
+ pScreenPriv->pwinCloseScreen(pScreen);
return FALSE;
}
@@ -224,7 +224,7 @@ winScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
winDebug("Screen %d added at virtual desktop coordinate (%d,%d).\n",
- index, pScreen->x, pScreen->y);
+ pScreen->myNum, pScreen->x, pScreen->y);
winDebug("winScreenInit - returning\n");
return TRUE;
@@ -352,8 +352,6 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv)
*/
pScreen->BlockHandler = winBlockHandler;
pScreen->WakeupHandler = winWakeupHandler;
- pScreen->blockData = pScreen;
- pScreen->wakeupData = pScreen;
/* Render extension initialization, calls miPictureInit */
if (!fbPictureInit(pScreen, NULL, 0)) {
@@ -623,8 +621,6 @@ winFinishScreenInitNativeGDI(int index,
*/
pScreen->BlockHandler = winBlockHandler;
pScreen->WakeupHandler = winWakeupHandler;
- pScreen->blockData = pScreen;
- pScreen->wakeupData = pScreen;
/* Place our save screen function */
pScreen->SaveScreen = winSaveScreen;
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 4b0eba1cb..f6ba49a8a 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -49,7 +49,7 @@ static void
winShadowUpdateDD(ScreenPtr pScreen, shadowBufPtr pBuf);
static Bool
- winCloseScreenShadowDD(int nIndex, ScreenPtr pScreen);
+ winCloseScreenShadowDD(ScreenPtr pScreen);
static Bool
winInitVisualsShadowDD(ScreenPtr pScreen);
@@ -613,7 +613,7 @@ winInitScreenShadowDD(ScreenPtr pScreen)
*/
static Bool
-winCloseScreenShadowDD(int nIndex, ScreenPtr pScreen)
+winCloseScreenShadowDD(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
@@ -628,7 +628,7 @@ winCloseScreenShadowDD(int nIndex, ScreenPtr pScreen)
/* Call the wrapped CloseScreen procedure */
WIN_UNWRAP(CloseScreen);
if (pScreen->CloseScreen)
- fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
+ fReturn = (*pScreen->CloseScreen) (pScreen);
winFreeFBShadowDD(pScreen);
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 17fe23e5a..2a28d8717 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -69,7 +69,7 @@ static void
winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf);
static Bool
- winCloseScreenShadowDDNL(int nIndex, ScreenPtr pScreen);
+ winCloseScreenShadowDDNL(ScreenPtr pScreen);
static Bool
winInitVisualsShadowDDNL(ScreenPtr pScreen);
@@ -766,7 +766,7 @@ winInitScreenShadowDDNL(ScreenPtr pScreen)
*/
static Bool
-winCloseScreenShadowDDNL(int nIndex, ScreenPtr pScreen)
+winCloseScreenShadowDDNL(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
@@ -781,7 +781,7 @@ winCloseScreenShadowDDNL(int nIndex, ScreenPtr pScreen)
/* Call the wrapped CloseScreen procedure */
WIN_UNWRAP(CloseScreen);
if (pScreen->CloseScreen)
- fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
+ fReturn = (*pScreen->CloseScreen) (pScreen);
winFreeFBShadowDDNL(pScreen);
diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c
index c4d1da8d0..2e5714bf0 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -50,7 +50,7 @@ static void
winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf);
static Bool
- winCloseScreenShadowGDI(int nIndex, ScreenPtr pScreen);
+ winCloseScreenShadowGDI(ScreenPtr pScreen);
static Bool
winInitVisualsShadowGDI(ScreenPtr pScreen);
@@ -565,7 +565,7 @@ winInitScreenShadowGDI(ScreenPtr pScreen)
*/
static Bool
-winCloseScreenShadowGDI(int nIndex, ScreenPtr pScreen)
+winCloseScreenShadowGDI(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
@@ -580,7 +580,7 @@ winCloseScreenShadowGDI(int nIndex, ScreenPtr pScreen)
/* Call the wrapped CloseScreen procedure */
WIN_UNWRAP(CloseScreen);
if (pScreen->CloseScreen)
- fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
+ fReturn = (*pScreen->CloseScreen) (pScreen);
/* Delete the window property */
RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP);
diff --git a/xorg-server/hw/xwin/winwakeup.c b/xorg-server/hw/xwin/winwakeup.c
index 1d2bfedbe..77c160533 100644
--- a/xorg-server/hw/xwin/winwakeup.c
+++ b/xorg-server/hw/xwin/winwakeup.c
@@ -38,8 +38,8 @@
/* See Porting Layer Definition - p. 7 */
void
-winWakeupHandler(int nScreen,
- pointer pWakeupData, unsigned long ulResult, pointer pReadmask)
+winWakeupHandler(ScreenPtr pScreen,
+ unsigned long ulResult, pointer pReadmask)
{
MSG msg;