Commit Graph

4602 Commits

Author SHA1 Message Date
Matt Turner
2d40f22d1e Use C-style comments in x86emu
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17 23:13:04 -08:00
Jeremy Huddleston
4e8bf12b13 XQuartz: Fix a possible buffer overrun in quartzAudio
Also dropped deprecated API while there

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15 16:46:21 -08:00
Jeremy Huddleston
4127e8e5be XQuartz: clang static analysis fixes
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15 15:03:49 -08:00
Jeremy Huddleston
c686c5cbdc XQuartz: Fix linking (CloseInput())
Fixes regresison from d33adcdf03

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15 15:03:49 -08:00
Dan Nicholson
8736d112af xfree86: Reorder InputClass option priorities
Currently the config and InputClasses are merged together so that the
options from the config backend have the highest priority. This is bad
since it means options such as a default XKB layout set by the backend
cannot be changed by the user.

This patch changes order of precedence to be:

1. xorg.conf
2. xorg.conf.d (later files have higher priority)
3. config backend

In order to allow this ordering, the config parsing has been changed to
read the xorg.conf.d files before xorg.conf. This has the consequence
that the core device picking which looks for the first InputDevice may
not find it in xorg.conf.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-15 15:27:42 +10:00
Peter Hutterer
d33adcdf03 dix: move config_init into the DDX.
The only DDX currently using hotplugging is the xfree86 one and it looks
like it'll stay that way for a bit. Move the initialization to the DDX,
since Xephyr, Xnest, and friends don't need HAL or udev notifications.

Add CloseInput (counterpart to InitInput) to be able to clean up the config
initialization from the DDX as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-15 09:15:18 +10:00
Soeren Sandmann
0b73f98cbd xfree86: Add qxl driver to the autoconfig logic
The qxl driver is for the QXL virtualized graphics device.

Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12 14:48:11 -08:00
Keith Packard
57ffeb3f2b Merge remote branch 'jturney/master' 2010-02-12 13:36:32 -08:00
Peter Hutterer
c6d9bc092c Add tag matching to input attributes.
Tags may be a list of comma-separated strings that match against a MatchTag
InputClass section. If any of the tags specified for a device match against
the MatchTag of the section, this match is evaluated true and passed on to
the next match condition.

Tags are specified as "input.tags" (hal) or "ID_INPUT.tags" (udev), the
value of the tags is case-sensitive and require an exact match (not a
substring match).

i.e. "quirk" will not match "QUIRK", "need_quirk" or "quirk_needed".

Example configuration:
udev:
    ENV{ID_INPUT.tags}="foo,bar"

hal:
    <merge key="input.tags" type="string">foo,bar</merge>

xorg.conf:
    Section "InputClass"
            Identifier "foobar quirks"
            MatchTag "foo|foobar"
            Option "Foobar" "on"
    EndSection

Where the xorg.conf section matches against any device with the tag "foo"
or tag "foobar" set.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-11 19:25:49 +10:00
Peter Hutterer
3ac43df5d4 Add xstrtokenize to the dix.
Move tokenize out of the parser, make it a dix util function instead.
Splitting a string into multiple substrings is useful by other places, so
let's use it across the line. Future users include config/hal, config/udev
and of course the parser.

Example usage:
char **substrings = xstrtokenize(my_string, "\n");

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-11 19:25:39 +10:00
Dan Nicholson
27d1b86d1b xfree86: Set fnmatch pathname flag for InputClass device matching
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11 19:25:34 +10:00
Dan Nicholson
9b369f7127 xfree86: Allow multiple arguments to InputClass matches
In order to keep the number of InputClass sections manageable, allow
matches to contain multiple arguments. The arguments will be separated
by the '|' character. This allows a policy to apply to multiple types of
devices. For example:

    Section "InputClass"
        Identifier "Inverted Mice"
        MatchProduct "Crazy Mouse|Silly Mouse"
        Option "InvertX" "yes"
    EndSection

This applies to the MatchProduct, MatchVendor and MatchDevicePath
entries. Currently there is no way to escape characters, so names or
patterns cannot contain '|'.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11 19:25:32 +10:00
Dan Nicholson
a378e361a5 xfree86: Use "Ignore" option in InputClass to skip devices
Sometimes it is desirable to skip adding specific input devices to the
server. The "Ignore" option is used similarly to Monitor sections so
that matched devices will not be added. BadIDChoice is returned to the
config backend so that it will clean up all resources.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11 19:25:18 +10:00
Dan Nicholson
8b1a685f00 xfree86: Handle config files ending without newline
The config parser expects to find a newline at the end of each line, so
files ending without one would confuse it. A newline is inserted at the
end of the buffer in these situations. Additionally, switching to the
next config file is moved to the higher level to allow parsing of the
last line of the previous file to complete before shifting the index and
resetting the line number.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Stephan Raue<stephan.raue@gmx.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11 19:25:14 +10:00
Dan Nicholson
67bc278a51 xfree86: Make InputClass docs and comments match reality
Drivers and options specified in InputClass sections work on a "first
match wins" strategy. Let's be consistent when documenting it.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11 19:25:10 +10:00
Jon TURNEY
c76248fda9 Cygwin/X: Avoid a collision between DEBUG and a token name
Rename a token to avoid a collision between DEBUG defined via AC_DEFINE
if --enable-debug is configured, and the token for the 'debug' instruction
in the XWin preferences file

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:19 +00:00
Jon TURNEY
b7dbbd3cd4 Cygwin/X: Avoid cursor size log spam
Fedora 12 likes to use a 39x26 animated wait cursor.  Avoid spamming
the log with warnings that each frame can't be completely contained
in the 32x32 native cursor

Also reformat log message so it doesn't contain a '\n\t'. I mean,
it's not like we might want to grep the log or something...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:18 +00:00
Jon TURNEY
7f54ccafad Cygwin/X: Make transient windows resizable again
Reverts the change which makes parented windows non-resizeable

Because this was trying to do something which we should be doing, as an alternative we
try checking WM_NORMAL_HINTS for windows which shouldn't  be resizable

If a window has a maximum size specified, no maximize box
If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:16 +00:00
Jon TURNEY
654d2e372d Cygwin/X: Discourage other WMs in multiwindow mode
Tidying up of other WM detection code when ading SWT/Motif
fix in commit 71519a572f
was rather over-agressive and now allows other WMs to think
they can start when the internal WM is running.

Revert to the behaviour of selecting ButtonPressMask events
as well on the root window, so other WMs will be dissuaded
from starting

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:14 +00:00
Jon TURNEY
26857b1c20 Cygwin/X: Update XWin man page
Restructure to group similar options and offer some commentary on those groups
Review option descriptions, clarify and bring up-to-date

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:10 +00:00
Jon TURNEY
6f1836bfbd Cygwin/X: Update DDX specific -help text
Alphabetize options
Review option descriptions, clarify and bring up to date
Add missing option descriptions

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:19:26 +00:00
Jon TURNEY
22982b9e95 Cygwin/X: XSupportsLocale() failure is non-critical
Treat XSupportsLocale() returning false as non-critical to internal client
theads startup, and issue a warning, not an error

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:15:09 +00:00
Yaakov Selkowitz
f60b7712b3 Cygwin/X: Report BUILDERSTRING with version information
Report BUILDERSTRING with version information

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:15:08 +00:00
Jon TURNEY
2f2f3da080 Cygwin/X: Copy the state of the Windows keyboard device to the Virtual Core Keyboard at startup.
Otherwise, this happens lazily after the first keypress, which can lead
to applications which are started from a shell window and inspect the
keyboard state before a character is typed getting the wrong idea about
the desired keymap (e.g. xemacs shows this behaviour)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:15:05 +00:00
Jon TURNEY
7a440e5b7a Cygwin/X: Tidy up system.Xwinrc
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:15:04 +00:00
Yaakov Selkowitz
11252ed82e Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11
Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11)
Rename sample system.Xwinrc file not to have a X11R6 path in it's name
Add makefile install rule for system.XWinrc

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:14:52 +00:00
Yaakov Selkowitz
34269a90ea Cygwin/X: Update resources file and About dialog
Use the configured vendor web address in the About dialog

Update resources file: rework About dialog, use 'MS Shell Dlg 2'
logical font for all dialogs, add ellipsis to exit option in tray
menu as it (may) trigger another dialog.

Get short vendor name from xwin-config.h, like other configuration
data presented in the About dialog box, rather than creating the
PROJECT_NAME define

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 18:17:36 +00:00
Colin Harrison
881812438b Xming: Use 8 point font for URL in About dialog
Use an 8 point font for URL in About dialog, to match the rest
of the text in that dialog

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05 18:17:35 +00:00
Colin Harrison
c02638fd68 Xming: Add a manifest file
Use manifests to enable XP style controls
(only effective for XP and later and when themes are enabled).
The addition of manifests shouldn't cause compatibility problems with older Windows versions.

Manifest must have execute permissions, otherwise attempts to
execute XWin.exe in the same directory will fail...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05 18:17:33 +00:00
Jon TURNEY
fd8a32baba Cygwin/X: Window placement refinement for multiwindow mode
Window placement refinement for multiwindow mode, ensure a window actually
ends up somewhere visible if it tries to create itself offscreen (which
can happen for e.g. if it has a stored position from a different sized
display)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 18:17:32 +00:00
Jon TURNEY
7eb840fd42 Cygwin/X: Respect the system's ownership of the clipping region
Respect the system's ownership of the clipping region used for shaped windows

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 18:17:30 +00:00
Colin Harrison
bad41bdfd4 Xming: Always update the Windows title Unicode (wide-character) in -multiwindow mode.
Apply the Windows title wide-character in -multiwindow mode. Windows should now
display correct client X Window titles for locales with wide characters.

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05 18:17:29 +00:00
Jeremy Huddleston
52456c602c XQuartz: Attatch a stub display when CoreGraphics reports no displays.
This is half of the required changes to address the "stuck mouse pointer"
bug that occurs when X11 launches while the displays are asleep.  The
remainder of the fix is part of libXplugin which needs to be updated to
send XP_EVENT_DISPLAY_CHANGED when the display wakes up.  If you don't
have a recent enough libXplugin (expected in 2.5.0_beta2 or later), you
can cause this event to be sent by changing your display resolution (or
you could just start X11.app with your screens awake).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-01-30 14:49:02 -08:00
Jeremy Huddleston
15f4bb6dc6 XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-01-30 14:30:40 -08:00
Jeremy Huddleston
7ba5de6e9e XQuartz: Add some .gitignore magic
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-30 10:55:38 -08:00
Tiago Vignatti
5e81078cf5 xfree86: vgaarb: remove useless debug
This is RAC's remnant. Any sane person would use a more wise method of
debugging instead.

X.Org Bug 26074 <http://bugs.freedesktop.org/show_bug.cgi?id=26074>

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-28 22:45:01 -08:00
Aaron Plattner
e38df06772 DRI2: Bump the dri2 module version to 1.2.0 to reflect recent API changes.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-28 14:58:04 -08:00
Jesse Barnes
711e26466a DRI2: handle drawable destruction properly at DRI2SwapComplete time
Simon reported an issue with kwin that turned out to be a general problem.  If
a drawable goes away before its swap completes, we'll try to free it up.
However, we free it improperly, which causes a server crash in
DRI2DestroyDrawable.  Fix that up by splitting the free code out and calling
it from DRI2SwapComplete.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:35:18 -08:00
Alan Coopersmith
0038290728 Avoid segfaults in XF86VidMode GammaRamp functions if randr_crtc is NULL
Fixes crash when xscreensaver tries to use GammaRamp calls to fade out
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6915712

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:18:20 -08:00
Keith Packard
0b21a0416b Merge remote branch 'alanc/master' 2010-01-27 14:14:15 -08:00
Michael Vogt
1e6fd65d0b xfree86/modes: only call gamma_set if its non NULL
I ran accross a crash with xf86-video-nv-2.1.15 [1] and xserver
1.7.3.901. It looks like the problem is that gamma_set is called even
if that is NULL.

[1] https://launchpad.net/bugs/494627

Reviewed-By: Matthias Hopf <mhopf@suse.de>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:10:48 -08:00
Aaron Plattner
f311f2d047 DRI2: Allow multiple driver names.
Each driver type (e.g. DRI2DriverDRI or DRI2DriverVDPAU) can have a name in the
driverNames array in DRI2InfoRec.  DRI2Connect returns the name for the driver
specified by driverType.  Also print names of supported drivers in
DRI2ScreenInit.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 13:57:00 -08:00
Christian Zander
f57bc0ede8 x86emu: Respect the LEA 67h address size prefix.
Signed-off-by: Christian Zander <chzander@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 13:48:37 -08:00
Alan Coopersmith
39ab474197 Move OS-specific VT key handler code from common to os-support
Adds new function xf86Activate to the OS-specific *VTsw*.c files
and calls it from xf86ProcessActionEvent

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (GNU/Linux)
2010-01-25 11:10:00 -08:00
Aaron Zang
15ca3312c0 Solaris: Avoid switching to inactive VT's
Fix for OpenSolaris bug 6876992: "[vconsole] Ctrl+Alt+F12 switchs to blank
console screen with hotkeys property turned-off"
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6876992

Xorg needs to do sanity test for the VT it is commanded to switch to.
If the VT is not opened by any process, discard the switching request.

The changes also contain the fix for some flaws discovered when
getting the new gdm to run.

Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-25 11:09:28 -08:00
Gaetan Nadon
2984c18eb9 config: replace custom code with reusable macro XORG_WITH_DOXYGEN
XORG_WITH_DOXYGEN provides additional functions like a configure
option which allow platform builders to control the usage of
the doxygen program.

This is a requirement from platforms that do not have such doc tool.
A platform with a back level doxygen may use --without-doxygen
to get the rest of the documentation built.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-24 12:52:20 -08:00
Peter Hutterer
6850ea8fb9 xfree86: replace True/False with TRUE/FALSE.
xf86Xinput.c relied on xkbsrv.h's definition of True/False which seems odd
at first and weird on second glance.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-25 09:33:08 +13:00
Jeremy Huddleston
6f6a99abc1 XQuartz: Don't FatalError in x_hook_run if the list is empty
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-13 14:39:54 -08:00
Jeremy Huddleston
6bde306f7f XQuartz: Update copyright in bundle for 2010
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-13 11:21:28 -08:00
Jeremy Huddleston
6008cc1164 XQuartz: Setup the modifier map in the quartz thread
This avoids possible doing it twice which could result in incorrect
keycodes for alt due to our loss of information about its side.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-13 11:21:28 -08:00
Keith Packard
44f9c3d16c Merge remote branch 'jbarnes/master' 2010-01-13 10:19:21 -08:00
Jesse Barnes
84956ca43b GLX/DRI2: add INTEL_swap_event support
This allows clients to easily check for swap completion status in their
main loop.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Adam Jackson <ajax@nwnk.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-11 16:17:15 -05:00
Jesse Barnes
04a54f69a8 DRI2: add support for new DRI2 protocol requests
Support the new DRI2 2.2 protocol requests: DRI2SwapBuffers, DRI2GetMSC,
DRI2WaitMSC, DRI2WaitSBC and DRI2SwapInterval.

These requests allow the server to support the SGI_video_sync,
SGI_swap_interval, and OML_sync_control GLX extensions if DDX support is
present.  The new DDX APIs are documented in dri2.h.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Adam Jackson <ajax@nwnk.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-11 16:16:35 -05:00
Simon Thum
032f97808c xfree86: init pointer feedback controls from options
With InputClass support, it makes more sense to cover all
aspects of acceleration in options. Previously, one could only set the
default on the command line.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-11 15:30:03 +10:00
Simon Thum
0722c287a4 xfree86: document pointer acceleration in xorg.conf.man
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-11 15:26:46 +10:00
Simon Thum
1aca2d7575 whitespace fixes
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-11 15:26:46 +10:00
Simon Thum
14039b5a79 doc: actually document SendDragEvents
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-11 15:26:45 +10:00
Gaetan Nadon
d727ddb91a kdrive: klinux.h breaks make dist
This file is no longer part of the source code
and must be removed from distribution.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-10 12:01:58 -08:00
Tiago Vignatti
74ab27f64a Revert "Make sys.c use unaligned access functions provided in compiler."
This reverts commit da923d0bc1.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-08 12:51:21 -08:00
Gaetan Nadon
1b3132f5e9 xwin: ignore intermediate .man file
Only detectable on a Cygwin build

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-07 12:56:09 -08:00
Mikhail Gusarov
9437504b21 kdrive: Remove unused kdNoopOps external variable declaration
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:50 +06:00
Mikhail Gusarov
aa6e0936be kdrive: Remove unused kmap.c
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:45 +06:00
Mikhail Gusarov
f78ac5c6e2 kdrive: Make internal functions static
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:37 +06:00
Mikhail Gusarov
37a8ddc0db kdrive: Remove unused 'k' variable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:32 +06:00
Mikhail Gusarov
af1f1a05e1 kdrive: Remove bus mouse driver
Bus mice aren't used anymore, do not keep dead code around.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:25 +06:00
Mikhail Gusarov
a3cc3af186 kdrive: Adjust kdrive usage message as shadow overlay support has been dropped
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:27:15 +06:00
Mikhail Gusarov
c40b9f9591 kdrive: Remove unused VxWorks* variable declarations
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 20:26:59 +06:00
Mikhail Gusarov
4e0d580d5a kdrive: Remove unused KdCardInfo::lastMarker field
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
dbaab9759b kdrive: Extract common part of fbdevPutColors and fbdevEnable
Put framebuffer colormap updating code in separate function
for brevity.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
7ee14154b2 kdrive: Remove unused overlay fb support
Xfbdev, Xephyr and Xfake all use only one framebuffer, so simplify
implementation by removing overlay support.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
730f7d1c4f kdrive: Remove unused KD_MAX_CARD_ADDRESS macro
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
5337ddcfd9 kdrive: Move Xephyr-specific fields out of KdScreenInfo
memory_base, memory_size, off_screen_base fields in
KdScreenInfo are used only by fake EXA in Xephyr. Move
them into Xephyr, cleanup Xfake and Xfbdev.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
62883b499b kdrive: Remove unused KdCardAttr from KdCardInfo
Card attrs are unused in all current kdrive servers, so
remove it completely to avoid allocating and passing dummy
values to KdCardInfoAdd.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
6c2b3a4247 kdrive: Add option to compile out input drivers
Add --without-kdrive-{kbd,mouse,evdev} configure options disabling
Linux keyboard driver, Linux mouse drivers (ps2, bus,ms),
and Linux evdev driver.

Build all drivers by default as before.

Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
72ba717b1d kdrive: Remove unused KdCardInfo::needSync field
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov
d21b41cdb5 kdrive: Remove .gitignore left from SDL server
SDL server is gone, no need to keep its .gitignore anymore.

Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-01-06 19:47:53 +06:00
Adam Jackson
326429badf modes: Remove the ClockRanges type
ba2d39dd54 introduced warnings:

xf86Mode.c: In function ‘xf86CheckModeForDriver’:
xf86Mode.c:986: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type
xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’
xf86Mode.c:1002: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type
xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’

Because I foolishly didn't notice that we had types with nearly
identical members named ClockRange and ClockRanges.  The latter
contained an extra 'strategy' member at the end, which claimed to be
needed by the vidmode extension.  Of course, this was a lie: the only time
we'd use it was in mode validation, for drivers using LOOKUP_CLKDIV2 with
non-programmable clocks.  The only driver using LOOKUP_CLKDIV2 is
rendition, which has a programmable clock.  The only driver using the
ClockRanges type was smi, which did not use it for its 'strategy' member,
so has been fixed to use ClockRange instead.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-05 13:30:22 -08:00
Mikhail Gusarov
e10072b7c7 Add Xephyr.man to .gitignore
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by:  Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-01 23:28:18 -08:00
Mikhail Gusarov
fb26cb793c Remove unused pShadow field from drivers' private structures
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-01 23:28:14 -08:00
Mikhail Gusarov
2c85d72fc7 Do not check xfree argument for NULL
xfree itself checks for NULL, and even this is not necessary
as passing NULL to free(3) is safe.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-01 23:27:53 -08:00
Mikhail Gusarov
15bc35c6e4 Remove trailing whitespace
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-01 23:22:49 -08:00
Julien Cristau
435f27667f config: add libudev input-hotplug backend
Add a backend using libudev for input hotplug, and disable the hal and
dbus backends if this one is enabled.

XKB configuration happens using xkb{rules,model,layout,variant,options}
properties (case-insensitive) on the device.  We fill in InputAttributes
to allow configuration through InputClass in Xorg.

Requires udev 148 for the input_id helper and ID_INPUT* properties.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-30 19:05:44 +00:00
Peter Hutterer
b8b12e41c4 xfree86: move sanity checks below option and input classes merges.
While the identifier is likely set before the input classes are merged, the
driver may not be. Hence don't check for a driver before we've completed
configuration for this device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-12-30 17:45:23 +00:00
Keith Packard
9fad8f06fb Merge remote branch 'dbn/inputclass' 2009-12-30 09:28:19 -08:00
Keith Packard
871bbe1d87 Merge remote branch 'dbn/xorg.conf.d' 2009-12-30 09:16:45 -08:00
Michel Dänzer
d42f396051 EXA: Allow optimized migration to be enabled with mixed pixmaps.
This was always the intention, I only recently realized it wasn't the case
yet...

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-28 22:01:42 -08:00
Dan Nicholson
42e8c9224e xfree86: Introduce InputClass configuration
Currently Xorg uses hal's fdi files to decide what configuration options
are applied to automatically added input devices. This is sub-optimal
since it requires users to use a new and different configuration store
than xorg.conf.

The InputClass section attempts to provide a system similar to hal where
configuration can be applied to all devices with certain attributes. For
now, devices can be matched to:

* A substring of the product name via a MatchProduct entry
* A substring of the vendir name via a MatchVendor entry
* A pathname pattern of the device file via a MatchDevicePath entry
* A device type via boolean entries for MatchIsKeyboard, MatchIsPointer,
  MatchIsJoystick, MatchIsTablet, MatchIsTouchpad and MatchIsTouchscreen

See the INPUTCLASS section in xorg.conf(5) for more details.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-23 05:54:40 -08:00
Dan Nicholson
0711598dd3 config: Introduce InputAttributes in NewInputDeviceRequest
In order to give NewInputDeviceRequest more information, a new
InputAttributes type is introduced. Currently, this collects the product
and vendor name, device path, and sets booleans for attributes such as
having keys and/or a pointer. Only the HAL backend fills in the
attributes, though.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:24:13 -08:00
Dan Nicholson
c6e8637e29 xfree86: Support non-Option boolean entries in configuration
Refactored code into the parser to allow the freeform boolean types used
in Option entries to be used in other configuration entries. This isn't
as powerful as allowing "No" to precede the option names, but it atleast
gives a common handling of "yes", "no", etc.

A type xf86TriState has been added to support an optional boolean. This
allows the boolean sense of the value to be kept while providing a means
to signal that it is unset.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:24:02 -08:00
Peter Hutterer
e1165632bd xfree86: Add Option AutoServerLayout for input devices.
Any input device with this option will be automatically added to whichever
server layout is selected at startup. This removes the need to reference a
device from the ServerLayout section. The two following configuration are
identical:

CONFIG 1:
    Section "ServerLayout"
            InputDevice "foo"
    EndSection

    Section "InputDevice"
            Identifier "foo"
            ...
    EndSection

CONFIG 2:
    Section "InputDevice"
            Identifier "foo"
            Option "AutoServerLayout" "on"
            ...
    EndSection

The selection of the server layout affects both explicitly specified
layouts and the implicit layout.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp at keithp.com>
2009-12-22 23:22:09 -08:00
Dan Nicholson
592b20c517 xfree86: Allow config directory to be specified on command line
Add a new command line parameter, -configdir, to specify the config
directory to be used. Rules are the same as -config for root vs. user
privileges.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:52 -08:00
Dan Nicholson
efa5269f23 xfree86: Use xorg.conf.d directory for multiple config files
Currently there is a single file, xorg.conf, for configuring the server.
This works fine most of the time, but it becomes a problem when packages
or system services need to adjust the configuration. Instead, allow
multiple configuration files to live in a directory. Typically this will
be /etc/X11/xorg.conf.d.

Files with a suffix of .conf will be read and added to the server
configuration after xorg.conf. The server won't fall back to using the
auto configuration unless there is no config file and there are no files
in the config directory.

Right now this uses a simpler search template than the config file
search path by not using the command line or environment variable
parameters. The matching code was refactored a bit to make this more
coherent. Any DDX wanting to read the config files will need to call
xf86initConfigFiles before opening/reading them. This is to allow
xf86openConfigFile without xf86openConfigDirFiles and vice-versa.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:45 -08:00
Dan Nicholson
f1e869aca1 xfree86: Unexport configuration file symbols
These functions should not be used outside of DDXs, so no need to put
them in the ABI.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-12-22 23:20:20 -08:00
Peter Hutterer
72286eae9f xfree86: remove LAYOUT_DEBUG section.
I don't think this one has been in use since 2003.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-22 21:28:40 -08:00
Peter Hutterer
38b5afb0b5 xfree86: remove some 'enable this later' and if 0 ifdefs
2003 called, they want their ifdefs back.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-22 21:27:54 -08:00
Keith Packard
7dc78db79e Merge remote branch 'whot/master' 2009-12-22 21:25:18 -08:00
Peter Hutterer
190610e0c6 xfree86: remove HistorySize from the xorg.conf man page.
This option isn't parsed by anything anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-22 15:34:02 +10:00
Peter Hutterer
094c6b9f97 xfree86: reword InputDevice man sections, deprecate CorePointer/CoreKeyboard
Reshuffle and reword - InputDevice sections are only necessary if
hotplugging is disabled. Put more emphasis on hotplugging and less on HAL
since we'll switch backends eventually.

CorePointer, CoreKeyboard, and AlwaysCore should be listed as deprecated
since they don't do what they used to since 1.4. These days, only
SendCoreEvents matters and it's enabled for any driver calling
xf86ProcessCommonOptions (== every driver).
It only controls the startup behavior too, so document this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-22 15:34:01 +10:00
Alan Coopersmith
895f40792a Add type name argument to CreateNewResourceType
Convert all calls of CreateNewResourceType to pass name argument

Breaks DIX ABI.

ABI versions bumped:

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 17:44:12 -08:00
Alan Coopersmith
a11c58fa0c Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith
eb750f8b5e Check for failures from CreateNewResourceType
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension.   Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith
48749cc21b Add platform compatibility defines for Sun Studio compilers
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:31:53 -08:00
Alan Coopersmith
b63912ed4c Convert checks for PC98 support from platform #ifdefs to configure flag
Default remains the same - on for most OS'es on i386 (except Solaris),
off for everyone else.   Can be manually toggled via --enable-pc98 or
--disable-pc98.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 10:30:53 -08:00
Peter Hutterer
801bc8075a xfree86: update man page for special keys handling.
SpecialKeyHandling was removed from the kbd driver with version 1.4.0. Since
this is the only version that will build against server 1.7+ it's not
reasonable to mention it in the man page. Reword, point to XKB instead and
make clear that some key combinations _may_ not be available in any given
config.

Reported-by: Derek Fawcus
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-18 10:53:26 +10:00
Peter Hutterer
753310837c xfree86: DontZap has been disabled for a while now, say so in the man page.
1.7 always shipped with DontZap disabled, it's just the default keymaps that
may not include the symbol to trigger it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-12-18 10:53:26 +10:00
Keith Packard
0cb638dc68 Merge remote branch 'alanc/master' 2009-12-16 21:58:44 -08:00
Keith Packard
6a6a041c2d Merge remote branch 'jeremyhu/master' 2009-12-16 21:57:32 -08:00
Ville Syrjälä
8127465f44 xf86xv: Fix off-by-one in viewport clipping
Most of the Xv Put/Get operations have an off by one error in the
viewport clipping.

Apparently PutImage was fixed at some point but the same code was
already copy-pasted all over the place, and so the other operations
still suffer from the bug.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:53:18 -08:00
Peter Hutterer
faca1bc582 xfree86: belately init RandR12 if xinerama fails. (#24627)
On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote:
> On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote:
> > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote:
> > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote:
> > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
> > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
> > > > only one screen is found, Xinerama is disabled again and RandR12 tries to
> > > > access data it never initialized.
>
> I'd sure like to have RandR get enabled when xinerama doesn't; is there
> an easy way of making that happen here? Perhaps having the RandR12 code
> disable Xinerama when only one screen is found? Or some other kludge?

you know the dependency better than I do so any hints are apreciated.
afaict, the screenInfo.numScreens (the check used by Xinerama) isn't
necessarily initialized at this point so we can't use the same check.
The following seems to work though:

From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 14 Dec 2009 11:00:58 +1000
Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627)

Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
only one screen is found, Xinerama is disabled again and RandR12 tries to
access data it never initialized.

Dependency chain is:
- ProcessCommandLine sets noPanoramiXExtension to FALSE
- xf86RandR12Init() is a noop
- PanoramiXExtensionInit sets noPanoramiXExtension to TRUE
- xf86RandR12CreateScreenResources tries to use the devPrivates key it never
  initialized.

This hack checks if there's only one screen at the time RandR12 is
initialized. If so, we expect Xinerama to fail anyhow so we disable it
ourselves and proceed as planned.

X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:50:00 -08:00
Tiago Vignatti
5f898ddbaa xfree86: fix -quiet option behaviour
Previously it was trying to set the same value as the default one. Sigh.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:49:31 -08:00
Tiago Vignatti
f57240a0a8 xfree86: spam output but with verbose level checked instead
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:49:22 -08:00
Alan Coopersmith
fbdf493a3e Add freetype & type1 to the LoadModules ignore list
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-16 17:11:52 -08:00
Alan Coopersmith
c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08:00
Jeremy Huddleston
d503195504 Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS
This is not portable, and accodring to Paulo should not be required any more.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-15 16:51:48 -08:00
Alan Coopersmith
dd2c83d03e Fix builds with --with-int10=stub
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-15 10:23:16 -08:00
Keith Packard
d3e054ac07 Merge remote branch 'jeremyhu/master' 2009-12-11 09:22:22 -08:00
Peter Hutterer
9ac6a048ef xfree86: remove unused variable in configureDDMonitorSection.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2009-12-11 11:37:37 +10:00
Jeremy Huddleston
97a6454ea5 XQuartz: pbproxy: Fix building of standalone xpbproxy executable
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-09 18:27:31 -08:00
Jeremy Huddleston
1b8f90aa8b Miscellaneous compilation warning fixes
main.c:134: warning: no previous prototype for 'dix_main'
rootlessScreen.c: In function 'RootlessMarkOverlappedWindows':
rootlessScreen.c:434: warning: function declaration isn't a prototype
backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
set.c: In function 'RecordSetMemoryRequirements':
set.c:413: warning: old-style function definition
set.c: In function 'RecordCreateSet':
set.c:425: warning: old-style function definition
stub.c: In function ‘main’:
stub.c:236: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-08 15:50:28 -08:00
Keith Packard
98c8b75225 Merge remote branch 'whot/master' 2009-12-02 15:28:07 -08:00
Peter Hutterer
761ae22f88 xfree86: tell users to disable AutoAddDevices, not AllowEmptyInput.
Technically, disabling AEI is the right suggestion. AEI off forces the
server to init the built-in defaults for input devices (or pick the first
one from the config file). At the same time, hotplugging is still available
with AEI off.

Unfortunatly, in the vast majority of cases users want to simply disable
hotplugging or have a working server while the local HAL configuration is
broken or missing. Disabling AEI will lead to duplicate events, triple
keystrokes, etc. once the configuration works again.
It's not actually required to remove AEI once hotplugging works again,
though it will in many cases lead to a setup that appears broken.

Asking users to disable AutoAddDevices instead means those users disable
hotplugging, can then fix the HAL setup and they _must_ remove the config
line again to test if hotplugging works again. Which doesn't leave them with
a broken config once everything is working nice and dandy. Less bugreports,
everybody wins.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Rémi Cardona <remi@gentoo.org>
Acked-by: James Cloos <cloos@jhcloos.com>
2009-12-03 08:43:46 +10:00
Luc Verhaegen
0e084d8c71 Xv: Fix AdjustFrame when driver implements ReputImage.
Should probably also be applied to stabler xserver branches too.

Luc Verhaegen.

From a22bc20721bad506d8fa9772b1258568cbffe7d2 Mon Sep 17 00:00:00 2001
From: Luc Verhaegen <libv@skynet.be>
Date: Wed, 11 Nov 2009 15:52:39 +0100
Subject: [PATCH] Xv: Fix AdjustFrame when driver implements ReputImage.

Finally fixes fd.o #4653, filed more than 4 years ago.

Patch can be happily applied to all modular Xorg versions.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-02 08:41:03 -08:00
Jeremy Huddleston
f4fc340672 XQuartz: Drop calls to alloca
This makes us more consistent with the rest of the codebase, using xalloc/xfree

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-30 17:06:58 -08:00
Ingmar Vanhassel
b54bc14ce0 Update man-pages for new default font paths
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-25 13:34:36 -08:00
Jeremy Huddleston
4677b5a800 XQuartz: Allow better compatability with older versions of xinit
If we are id="org.x" and the launchd socket is ":0", we will claim
the socket to match the old behavior before we prefixed the
socket name with our id.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-23 18:00:31 -08:00
Zhao Yakui
19f7c15e20 xfree86: Edid quirk for Philips LCD LP154W01
v1->v2: Make one condition case for one quirk instead of merging them
together. This is based on the Keithp's suggestion.

Move the EDID quirk for Philips LCD LP154W01 as the panel reports the vertical
size in cm.

https://bugs.freedesktop.org/show_bug.cgi?id=24482

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-20 07:21:26 -08:00
Julien Cristau
30be7ceaf2 xfree86: set a sane umask before opening the log
Xorg creates its log file following the umask of the user running
startx, which may result in a world-writable log.  Set umask to 022 to
prevent this.

Debian bug#555308 <http://bugs.debian.org/555308>
See also http://thread.gmane.org/gmane.comp.security.oss.general/2299

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-17 12:55:44 -08:00
Matt Turner
fb95090730 Use glibc's in/out routines
Let's let glibc do the right thing for dense/sparse selection.

The _alpha_iobase code has been unused since the switch to libpciaccess. It
really should have been killed by fba700f1f6.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-16 20:17:29 -08:00
Gaetan Nadon
c739beb439 .gitignore: use common defaults with custom section #24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:40:20 -08:00
Jeremy Huddleston
9071b0d697 XQuartz: Explicitly pass a bellProc to make XBell() work again.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00
Jeremy Huddleston
e87a03fd53 XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00
Jeremy Huddleston
15fc56addc XQuartz: Buildfix for Leopard and older
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00
Chase Douglas
b5aa2e0a5f Move FD_CLR above pInfo->read_input
The event fd may be invalidated by the pInfo->read_input call. If it is
invalidated, the subsequent FD_CLR call will segfault. Thus, the FD_CLR
call must precede the pInfo->read_input call.

Signed-off-by: Chase Douglas <chasedouglas@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-10 18:33:05 -08:00
Jon TURNEY
ec5417b965 Cygwin/X: Ensure WM_STATE atom exists in multiwindow mode
Workaround a bug in iiimxcf (assuming the WM_STATE atom exists),
which can cause many Solaris clients to simply fail with a BadAtom
error

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:51 +00:00
Yaakov Selkowitz
aa860552fd Cygwin/X: Enable clipboard integration by default
Enable clipboard integration by default, can be turned off with -noclipboard.
We still accept -clipboard for backwards compatibility.  If both are passed,
the last one is accepted (just as other arguments are handled).

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:50 +00:00
Jon TURNEY
87b00ced3d Cygwin/X: Setup screen layout in Xinerama mode
Setup screen layout according to the screen window native window
positions in Xinerama mode

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:48 +00:00
Yaakov Selkowitz
26a69bbd9b Cygwin/X: Mount options have changed in cygwin-1.7
Mount options have changed in cygwin-1.7

Also fix a typo in the warning issued if /tmp is a textmode mount

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:46 +00:00
Paul Loewenstein
35901ece6a Cygwin/X: Handle fake keypresses generated by speech recognizers
Apparently, fake keypresses generated by speech recognizers may not bother
with a scan code, so look up what scan code corresponds to the virtual key
code if this occurs.

Patch by Paul Loewenstein <paul.loewenstein@gmail.com>

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:45 +00:00
Jon TURNEY
0866322b57 Cygwin/X: Always use an authorization cookie for internal clients
Don't conditionalize use of an authorization cookie for internal client
threads on XCSECURITY, always use one (this avoids certain problems
with XDMCP setups where the XDMCP host removes localhost from the access
list etc.)

Conditionalize the use of a XCSECURITY authorization descriptor on XCSECURITY

Consolidate the various places where the authorization cookie is set
for internal threads into a new function, winSetAuthorization()

Use authorization cookie for multiwindow WM X message thread as well

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:44 +00:00
Colin Harrison
72f81f4e44 Xming: Make -auth option work in with -multiwindow
Use an internally generated cookie for authentication of the internal
window manager client when using the -auth option in -multiwindow mode.

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:42 +00:00
Colin Harrison
6dbf8f27c8 Xming: Tidy up code for initial native window positioning
Tidy up code for initial native window positioning and avoid a
duplicate call to winMultiWindowGetTransientFor()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:41 +00:00
Colin Harrison
091cbbaed7 Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboard
XConvertSelection() in libX11 always returns 1, so there is no point in
testing it incorrectly against Success. This is possibly a bug in
XConvertSelection()

This should fix UTF8String and CompoundText selection via the clipboard.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:39 +00:00
Jon TURNEY
9657eae5d6 Cygwin/X: Clearly diagnose a timeout while waiting for SelectionNotify event
Clearly diagnose a timeout while waiting for SelectionNotify event
in the clipboard integration internal client.
(which seems to be behind some of the reported failures)

Turn useless #if 0/ErrorF()/#endif into useful winDebug()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:38 +00:00
Jon TURNEY
062f49a8e0 Cygwin/X: Add a workaround for a SWT/Motif bug to internal window manager
SWT/Motif expects all top-level windows to get reparented, and waits until they
do. So workaround that in our internal WM by forcing a reparent event to
occur, even though we don't actually need to reparent the window to
frame it (as the frame is a native window, not an X window)

http://sourceware.org/bugzilla/show_bug.cgi?id=9848
https://bugs.eclipse.org/bugs/show_bug.cgi?id=36806

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:36 +00:00
Jon TURNEY
71519a572f Cygwin/X: Fix typo in g_fAnotherWMRunning and tidy up WM detection code
Tidy up code for detecting another WM is already running
Fix typo g_fAnotherWMRunnig -> g_fAnotherWMRunning
Remove some unused event mask macros

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:35 +00:00
Colin Harrison
f3fad371cc Xming: Add FORCEEXIT option to configuration file
Add a new option to configuration file: FORCEEXIT, like SILENTEXIT
but ignores the client count. Unsaved client work may be lost with
this option but it is useful if you want no dialogs.

Add description of this new keyword to XWinrc man page

Also fix grammar of the exit confirmation dialog warning to be correct
when there is only one(1) client connected.

Also rearrange yacc tokens to one per line to make future merges
easier

Also amend default system.XWinrc so that SILENTEXIT is on by default

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:34 +00:00
Colin Harrison
019a601de6 Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion()
Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as
they are in screen coordindates and may need to be scaled to the axis range
appropriately

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:33 +00:00
Colin Harrison
7af1240b57 Xming: Replace all the uses of deprecated functions in hw/xwin with current ones
Replace uses of LookupIDByType() and SecurityLookupIDByType()
with dixLookupResourceByType()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:32 +00:00
Jon TURNEY
2a38f7c0db Cygwin/X: Remove a couple of extraneous '\n' in logged version info
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:31 +00:00
Dave Airlie
d85ab6b648 loader: actually stat something that has some chance of existing. (v2)
FindModuleInSubdir seems to expect a / at the end of the subdir its
finding for, so we add the / early, the stat will fail if its
not a subdir, I'm leaving the S_ISDIR in just in case there is another
reason it could return 0. This does look a bit silly in strace
but it seems to work fine.

I have a very intermittent issue where drivers loses its / that
I've been seeing on/off for a while, this may or may not fix it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-09 08:24:39 -08:00