diff options
author | marha <marha@users.sourceforge.net> | 2010-02-15 08:14:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-02-15 08:14:29 +0000 |
commit | b40e949511ca8c00cd7d13c622b5247145d44ab3 (patch) | |
tree | ce21480d852a4748ad12a56f3579acf1cbc09f41 /xorg-server | |
parent | fb89fb367b0defb8016ac97af590a6f5873c217f (diff) | |
parent | 6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e (diff) | |
download | vcxsrv-b40e949511ca8c00cd7d13c622b5247145d44ab3.tar.gz vcxsrv-b40e949511ca8c00cd7d13c622b5247145d44ab3.tar.bz2 vcxsrv-b40e949511ca8c00cd7d13c622b5247145d44ab3.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/Xi/exevents.c | 20 | ||||
-rw-r--r-- | xorg-server/config/udev.c | 6 | ||||
-rw-r--r-- | xorg-server/dix/main.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/dmx/dmxinput.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrinit.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fake/fakeinit.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fbdev/fbinit.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/vfb/InitInput.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Config.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Init.c | 10 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 35 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre | 4 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Init.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xwin/InitInput.c | 14 | ||||
-rw-r--r-- | xorg-server/hw/xwin/XWin.exe.manifest | 16 | ||||
-rw-r--r-- | xorg-server/hw/xwin/system.XWinrc | 128 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winconfig.c | 2 | ||||
-rw-r--r-- | xorg-server/include/input.h | 3 |
18 files changed, 235 insertions, 38 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 140a353cc..4aae7d6c5 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -446,6 +446,26 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) to->key = NULL;
}
+ /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps
+ * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo
+ * didn't update the pointers so we need to do it manually here.
+ */
+ if (to->kbdfeed)
+ {
+ KbdFeedbackPtr k;
+
+ for (k = to->kbdfeed; k; k = k->next)
+ {
+ if (!k->xkb_sli)
+ continue;
+ if (k->xkb_sli->flags & XkbSLI_IsDefault)
+ {
+ k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators;
+ k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps;
+ }
+ }
+ }
+
/* We can't just copy over the focus class. When an app sets the focus,
* it'll do so on the master device. Copying the SDs focus means losing
* the focus.
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c index 432ab85e9..69257e935 100644 --- a/xorg-server/config/udev.c +++ b/xorg-server/config/udev.c @@ -214,7 +214,6 @@ config_udev_init(void) struct udev *udev; struct udev_enumerate *enumerate; struct udev_list_entry *devices, *device; - int rc; udev = udev_new(); if (!udev) @@ -222,10 +221,6 @@ config_udev_init(void) udev_monitor = udev_monitor_new_from_netlink(udev, "udev"); if (!udev_monitor) return 0; - rc = udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, - "input", NULL); - if (rc < 0) - return 0; if (udev_monitor_enable_receiving(udev_monitor)) { ErrorF("config/udev: failed to bind the udev monitor\n"); @@ -235,7 +230,6 @@ config_udev_init(void) enumerate = udev_enumerate_new(udev); if (!enumerate) return 0; - udev_enumerate_add_match_subsystem(enumerate, "input"); udev_enumerate_scan_devices(enumerate); devices = udev_enumerate_get_list_entry(enumerate); udev_list_entry_foreach(device, devices) { diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 124de5efa..54cd8a919 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -301,7 +301,6 @@ int main(int argc, char *argv[], char *envp[]) InitCoreDevices();
InitInput(argc, argv);
InitAndStartDevices();
- config_init();
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
@@ -349,11 +348,10 @@ int main(int argc, char *argv[], char *envp[]) FreeAllResources();
#endif
- config_fini();
+ CloseInput();
memset(WindowTable, 0, sizeof(WindowTable));
CloseDownDevices();
- InputDevicesClosed();
CloseDownEvents();
for (i = screenInfo.numScreens - 1; i >= 0; i--)
diff --git a/xorg-server/hw/dmx/dmxinput.c b/xorg-server/hw/dmx/dmxinput.c index c099349d8..568bb882b 100644 --- a/xorg-server/hw/dmx/dmxinput.c +++ b/xorg-server/hw/dmx/dmxinput.c @@ -75,6 +75,10 @@ void InitInput(int argc, char **argv) mieqInit(); } +void CloseInput(void) +{ +} + /** Called from dix/dispatch.c in Dispatch() whenever input events * require processing. All the work is done in the lower level * routines. */ diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c index d0a4d8540..b90b92bac 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c @@ -95,6 +95,11 @@ InitInput (int argc, char **argv) KdInitInput();
}
+void
+CloseInput (void)
+{
+}
+
#ifdef DDXBEFORERESET
void
ddxBeforeReset (void)
diff --git a/xorg-server/hw/kdrive/fake/fakeinit.c b/xorg-server/hw/kdrive/fake/fakeinit.c index 87c221d37..ba61959ef 100644 --- a/xorg-server/hw/kdrive/fake/fakeinit.c +++ b/xorg-server/hw/kdrive/fake/fakeinit.c @@ -58,6 +58,11 @@ InitInput (int argc, char **argv) KdInitInput (); } +void +CloseInput (void) +{ +} + #ifdef DDXBEFORERESET void ddxBeforeReset (void) diff --git a/xorg-server/hw/kdrive/fbdev/fbinit.c b/xorg-server/hw/kdrive/fbdev/fbinit.c index 93646f6d7..51e7e00d9 100644 --- a/xorg-server/hw/kdrive/fbdev/fbinit.c +++ b/xorg-server/hw/kdrive/fbdev/fbinit.c @@ -45,6 +45,11 @@ InitInput (int argc, char **argv) } void +CloseInput (void) +{ +} + +void ddxUseMsg (void) { KdUseMsg(); diff --git a/xorg-server/hw/vfb/InitInput.c b/xorg-server/hw/vfb/InitInput.c index 7f2d56fa8..35d1dc4d2 100644 --- a/xorg-server/hw/vfb/InitInput.c +++ b/xorg-server/hw/vfb/InitInput.c @@ -142,3 +142,8 @@ InitInput(int argc, char *argv[]) RegisterKeyboardDevice(k); (void)mieqInit(); } + +void +CloseInput (void) +{ +} diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 1abc182da..132e8bc37 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -2460,8 +2460,8 @@ xf86HandleConfigFile(Bool autoconfig) dirfrom = X_CMDLINE; xf86initConfigFiles(); - filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT); dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT); + filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT); if (filename) { xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename); xf86ConfigFile = xnfstrdup(filename); diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 670744802..2c206ff47 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -90,6 +90,8 @@ #include "Pci.h" #include "xf86Bus.h" +#include <hotplug.h> + /* forward declarations */ static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); @@ -1138,6 +1140,14 @@ InitInput(int argc, char **argv) if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc) break; } + + config_init(); +} + +void +CloseInput (void) +{ + config_fini(); } /* diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index c2d9f49de..e9f7f2fb7 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -586,37 +586,40 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs) /* * Merge in any InputClass configurations. Options in each InputClass - * section have less priority than the original device configuration as + * section have more priority than the original device configuration as * well as any previous InputClass sections. */ static int MergeInputClasses(IDevPtr idev, InputAttributes *attrs) { XF86ConfInputClassPtr cl; - XF86OptionPtr classopts; + XF86OptionPtr classopts, mergedopts = NULL; + char *classdriver = NULL; for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) { if (!InputClassMatches(cl, attrs)) continue; + /* Collect class options and merge over previous classes */ xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n", idev->identifier, cl->identifier); - if (cl->driver && !idev->driver) { - idev->driver = xstrdup(cl->driver); - if (!idev->driver) { - xf86Msg(X_ERROR, "Could not allocate memory while merging " - "InputClass configuration"); - return BadAlloc; - } - } - + if (cl->driver) + classdriver = cl->driver; classopts = xf86optionListDup(cl->option_lst); - if (idev->commonOptions) - idev->commonOptions = xf86optionListMerge(classopts, - idev->commonOptions); - else - idev->commonOptions = classopts; + mergedopts = xf86optionListMerge(mergedopts, classopts); + } + + /* Apply options to device with InputClass settings preferred. */ + if (classdriver) { + xfree(idev->driver); + idev->driver = xstrdup(classdriver); + if (!idev->driver) { + xf86Msg(X_ERROR, "Failed to allocate memory while merging " + "InputClass configuration"); + return BadAlloc; + } } + idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts); return Success; } diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre index c8a3c3ac2..93c8ac41d 100644 --- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre @@ -988,8 +988,8 @@ These sections are optional and are used to provide configuration for a class of input devices as they are automatically added. An input device can match more than one .B InputClass -section. Each class can only supplement settings from a previous class, so -it is best to arrange the sections with the most generic matches last. +section. Each class can override settings from a previous class, so it is +best to arrange the sections with the most generic matches first. .PP .B InputClass sections have the following format: diff --git a/xorg-server/hw/xnest/Init.c b/xorg-server/hw/xnest/Init.c index 0765f73d0..8a90cc65e 100644 --- a/xorg-server/hw/xnest/Init.c +++ b/xorg-server/hw/xnest/Init.c @@ -109,6 +109,11 @@ InitInput(int argc, char *argv[]) RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL); } +void +CloseInput(void) +{ +} + /* * DDX - specific abort routine. Called by AbortServer(). */ diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c index 51f7a923e..7d886a9fc 100644 --- a/xorg-server/hw/xwin/InitInput.c +++ b/xorg-server/hw/xwin/InitInput.c @@ -67,13 +67,6 @@ extern winDispatchProcPtr winProcQueryTreeOrig; #endif -void InputDevicesClosed(void) -{ - g_pwinPointer=NULL; - g_pwinKeyboard=NULL; -} - - /* Called from dix/devices.c */ /* * All of our keys generate up and down transition notifications, @@ -166,3 +159,10 @@ InitInput (int argc, char *argv[]) winDebug ("InitInput - returning\n"); } + +void +CloseInput (void) +{ + g_pwinPointer=NULL; + g_pwinKeyboard=NULL; +} diff --git a/xorg-server/hw/xwin/XWin.exe.manifest b/xorg-server/hw/xwin/XWin.exe.manifest new file mode 100644 index 000000000..221150d52 --- /dev/null +++ b/xorg-server/hw/xwin/XWin.exe.manifest @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <description>The XWin X Windows server for Cygwin.</description> + <dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="X86" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> + </dependency> +</assembly> diff --git a/xorg-server/hw/xwin/system.XWinrc b/xorg-server/hw/xwin/system.XWinrc new file mode 100644 index 000000000..f0771c610 --- /dev/null +++ b/xorg-server/hw/xwin/system.XWinrc @@ -0,0 +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..." + diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c index 022176f62..c2a0ef7ec 100644 --- a/xorg-server/hw/xwin/winconfig.c +++ b/xorg-server/hw/xwin/winconfig.c @@ -136,8 +136,8 @@ winReadConfigfile () /* Parse config file into data structure */
xf86initConfigFiles();
- filename = xf86openConfigFile (CONFIGPATH, xf86ConfigFile, PROJECTROOT);
dirname = xf86openConfigDirFiles (CONFIGDIRPATH, xf86ConfigDir, PROJECTROOT);
+ filename = xf86openConfigFile (CONFIGPATH, xf86ConfigFile, PROJECTROOT);
/* Hack for backward compatibility */
if (!filename && from == X_DEFAULT)
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index 52736e498..36de5044d 100644 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -411,8 +411,6 @@ extern void ProcessKeyboardEvent( InternalEvent* /*ev*/,
DeviceIntPtr /*keybd*/);
-extern void InputDevicesClosed(void);
-
extern Bool LegalModifier(
unsigned int /*key*/,
DeviceIntPtr /*pDev*/);
@@ -422,6 +420,7 @@ extern _X_EXPORT void ProcessInputEvents(void); extern _X_EXPORT void InitInput(
int /*argc*/,
char ** /*argv*/);
+extern _X_EXPORT void CloseInput(void);
extern _X_EXPORT int GetMaximumEventsNum(void);
|