Commit Graph

8044 Commits

Author SHA1 Message Date
Peter Hutterer
912402fd71 include: introduce byte counting functions.
This patch adds the following three functions:
 bits_to_bytes(bits) - the number of bytes needed to hold 'bits'
 bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes'
 pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than
                        'bytes'.

All three operations are common in protocol processing and currently the
server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set
of functions reduce the error rate of these (albeit simple) calculations and
improve readability of the code.

The functions do not check for overflow.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 10:05:53 +10:00
Peter Hutterer
2c535b6f13 dix: don't send presence events for attaching/detaching slave devices.
The code that didn't list attached slave devices for XI1 clients doesn't
exist anymore, so there's no need for these presence events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 09:00:35 +10:00
Peter Hutterer
0c0ef42292 dix: Remove temporary detachment of slave devices.
Previously, an active grab on an attached slave device would send the device
floating for the duration of the grab. This breaks existing XI applications
(e.g. the GIMP) since they grab all devices automatically - resulting in the
loss of control over the VCP.

The behaviour of extended input devices during a grab in relation to the
core pointer is not specified in the XI protocol specification.
The removal of the temporary detachment restores the behaviour of extended
input devices as present in currently released servers - even if a device is
grabbed, an event from this device will result in an event from the core
pointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12 21:54:35 +10:00
Peter Hutterer
9f1570c8f4 input: include effective modifiers in device events.
Require inputproto 1.9.99.13

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12 16:57:08 +10:00
Alan Coopersmith
78aedbe609 Fix int10 module build after typo in commit 2638e9899
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-10 17:35:57 -07:00
Michel Dänzer
3575854481 EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 .
2009-07-10 20:06:02 +02:00
Tiago Vignatti
2638e9899e configure: introduce --{enable,disable}-int10-module
Not all chipsets need to rely on the int10 scheme to do its daily work.

Well, the ideal would be to remove all int10 module from the server. I'll try
to provide some patches "soon" for this. Something like:
    http://cgit.freedesktop.org/~vignatti/libx86/

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-07-10 16:36:51 +03:00
Tiago Vignatti
42d95a3853 configure: introduce --{enable,disable}-vbe
Not all drivers need this kind of access as well.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-07-10 16:36:32 +03:00
Tiago Vignatti
53d6493051 configure: introduce --{enable,disable}-vgahw
Not all drivers need this kind of access.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-07-10 16:36:01 +03:00
Tiago Vignatti
aafcae79d1 xfree86: remove unused vbe header file
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-07-10 16:34:09 +03:00
Peter Hutterer
3711d68f65 Revert "XKB: Sanitise * actions" commits (#19602)
Reverts the following four patches:

feb757f384 "XKB: Sanitise vmods for redirected keys"
b5f49382fe "XKB: Sanitise ctrls action"
1bd7fd195d "XKB: Sanitise pointer actions"
61c508fa78 "XKB: Sanitise vmods in actions"

Strictly speaking, the structs used in the server are not part of the client
ABI. Practically, they are as we copy from the wire straight into the
structs. Changing the struct sizes breaks various wire/server conversions.

Even when the structs have the same size, some internal magic causes
conversions to fail. Visible by diffing the output files of:
setxkbmap -layout de; xkbcomp -xkb :0 busted.xkb
setxkbmap -layout de -print | xkbcomp -xkb - correct.xkb

Interestingly enough, busted.xkb is the working one although the output is
incorrect. Revert the four offending patches until the exact cause of this
breakage can be determined.

This patch restores functionality to Level3 modifiers.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-10 11:23:52 +10:00
Soren Sandmann Pedersen
08df24555c Reserve space for two GC values in copy_drawable().
Pointed out by Pierre Willenbrock.
2009-07-09 17:23:04 -04:00
Adam Jackson
3c53f32413 Since font modules are dead, don't mention them in xorg-server.pc 2009-07-09 17:21:07 -04:00
Adam Jackson
e812103382 config: drop i810.
The driver assuredly no longer builds against 1.7.  Please don't feel
compelled to fix it.
2009-07-09 10:58:17 -04:00
Alan Coopersmith
55ac155d42 Xephyr & Xserver man page fixes
Xephyr(1): Fix quote formatting, add missing ' to contraction
Xserver(1): Add Xephyr(1) & startx(1) to SEE ALSO section

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-07 17:36:24 -07:00
Michael Lorenz
36dc66ae79 The way XaceHook() mixes struct initializers and va_arg() is not portable and
gives bogus data on sparc and probably others leading to a crash.

Fix:
Don't use initializers, instead set each member directly to enforce order.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-07-07 20:21:39 -04:00
Jon TURNEY
48a9d65b88 Cygwin/X: Window positioning improvements for multiwindow mode
A few tweaks to winUpdateWindowPosition():

* Don't allow window decoration to disappear off to top or left edge of the
display as a result of adjustments to add decoration for the window style

* Honour the position requested by window geometry for the client area (so
windows which save their position don't get moved by the decoration width
every time they are created) (unless we need to bump it away from top or left edges)

* Fix an issue with initial window placement being offscreen on multimonitor
systems when some monitors have negative coordinates (are to the left of or
above the primary monitor)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-07-07 15:03:43 +01:00
Keith Packard
5aec727452 Remove old DRI2 buffer alloc/free interfaces
These old interfaces are no longer supported by the server, removing them
requires bumping the video driver ABI. Note that this is not guaranteed to
be the last change in ABI version 6.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2009-07-06 12:01:22 -07:00
Keith Packard
2e2c5b216c dri2: Preserve compatibility with 1.6 DRI2 API/ABI
The old DRI2 buffer allocation API wasn't great, but there's no reason to
make the server stop working with those drivers. This patch has the
X server adapting to the API provided by the driver, using the new API where
available and falling back to the old API as necessary. A warning will be
placed in the log file when the old API is in use.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06 12:01:12 -07:00
Søren Sandmann Pedersen
7c7f0c2c6a Use IncludeInferiors when copying windows before compositing.
Part of bug 22484.
2009-07-06 13:06:50 -04:00
Matthias Hopf
43ee8d2ead Unclaim PCI slot if driver probing fails.
Otherwise no subsequent driver will be able to claim this pci slot.
Example for this: fbdev tries to claim, but framebuffer device is not
available. Later on VESA cannot claim the device.
2009-07-06 18:38:26 +02:00
RALOVICH, Kristóf
73abdc94c3 glx: damage is only used with DRI
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-06 17:57:27 +03:00
RALOVICH, Kristóf
7208a0f032 glx: remove Xgl leftover
GlxSetRenderTables was only used by the long gone Xgl.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-06 17:57:23 +03:00
Peter Hutterer
89cf81cd85 Xext: return BadValue for XTestFakeInput on unsupported capabilities.
Calling XTestFakeDevice*Event on a device that doesn't allow the matching
event returns BadValue.

Reported-by: Florian Echtler
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06 12:59:42 +10:00
Peter Hutterer
b773b4e8e0 s/MAX_DEVICES/MAXDEVICES/ updates.
The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6)
Two comments updated to refer to MAXDEVICES.

MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more
than 15 physical input devices were present, this could result in a
failure to install the SIGIO handler for any device above 15.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06 12:58:39 +10:00
Peter Hutterer
183c075d2f dix: always init the full button map to default values (#22594)
Master devices must have the standard button map applied for all buttons to
ensure buttons larger than 7 (the default for MDs) are mapped appropriately.

We can't copy the button map from SDs to MDs since that breaks the chained
button mapping. However, by ensuring all buttons (even non-existing ones)
are mapped, devices that send such buttons continue to work.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06 12:58:03 +10:00
Peter Hutterer
744bb55982 Xext: remove unused variable 'it'.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06 12:58:03 +10:00
Eric Anholt
fd4eed69e4 dri2: Enable GLX_SGI_make_current_read when the DRI driver supports it.
This matches idr's 82f150d73c for DRI1.
2009-07-05 10:19:03 -07:00
Jeremy Huddleston
d6b8205e69 XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SL
(cherry picked from commit ddc0242d8f)
2009-07-03 19:46:00 -07:00
Colin Harrison
a49ae50370 Xming: Apply window style hints in -multiwindow mode
Remove frames from 'dock' windows and make them topmost in -multiwindow mode.
Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode.
Apply some _NET_WM_STATE hints in -multiwindow mode.
Apply window styles overrides from .rc file
Correctly update region of shaped windows when applying styles

Copyright (C) Colin Harrison 2005-2009
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
2009-07-03 11:19:38 +01:00
Joe Krahn
17e67c407d Cygwin/X: Change to a single native window class for all X windows
from fd.o Bugzilla #4491:

There is no point in having one class for every window, aside from trying to
set custom icons via the class, which we no longer do, so converted to using
a single class for all client windows.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-07-03 11:19:27 +01:00
Rémi Cardona
2c69deb92e configure: libXinerama isn't needed anymore
since libXinerama commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 and
xineramaproto commit 21477147613c28c968b5e1eb9d8aea7017dd399d, the
server no longer needs libXinerama.

Signed-off-by: Rémi Cardona <remi@gentoo.org>
2009-07-03 10:51:50 +02:00
Peter Hutterer
97e29ffb5b xfree86: fix wrong IsMaster() check causing crashes.
Crashes caused by dereferencing NULL if the path was executed for a floating
slave device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-03 09:56:37 +10:00
Peter Hutterer
50a2a8dc76 Fix IsXtstDevice - returns false positives since 0814f511d5.
Missing check for the value of 'mid' returned false positives if master was
NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-03 09:20:59 +10:00
Felix Kuehling
3525d14056 Export symbols needed by the RandR implementation in fglrx
GIT change
http://cgit.freedesktop.org/xorg/xserver/commit/?id=45c8bd0fe54273039fdaa1eeeafb81b5774f2c75
changed the default symbol visibility of the Xserver. As a result 2 symbols
that are needed by the RandR 1.2/1.3 implementation in the fglrx driver are no
longer visible:

xf86configptr
xf86CursorScreenKey

We would like to get these two symbols _X_EXPORT'ed before Xserver 1.7 is
released. Otherwise it will be problematic for fglrx to support RandR 1.3 on
Xserver 1.7.

In the future, we may want to sync our RandR implementation to later versions
of the RandR implementation in hw/xfree86/modes. Therefore it would be nice if
all symbols used by the Xserver RandR implementation were _X_EXPORT'ed in the
future.
2009-06-30 20:07:30 -04:00
Peter Hutterer
e13605ea40 dix: introduce "Xtst Device" label property.
Xtst devices get this property assigned automatically so they can be
detected easily by a client.
The property is read-only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-01 08:46:31 +10:00
Peter Hutterer
0814f511d5 input: store the master device's ID in the devPrivate for XTest devices.
Rather than storing a simple boolean in the devPrivate for XTest devices,
store the actual master device's id (since it is constant for the life of
the device anyway).

Callers should use GetXtstDevice now instead of digging around in the
devPrivates themselves.

This patch allows for a cleanup in the creation of new master devices since
GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and
similar.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-07-01 08:46:31 +10:00
Peter Hutterer
1bcc0d3c24 input: abstract Xtst device lookup
The callers should need to use the dev privates key to look up xtest
devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-07-01 08:46:31 +10:00
Peter Hutterer
34424fab9a dix: set the client's error value to the bad deviceid in check_butmap_change.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-01 08:46:30 +10:00
Eamon Walsh
da04e8f135 dix/property.c: use memcpy where appropriate.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-30 17:54:25 -04:00
Jon TURNEY
65d74d9314 Cygwin/X: Fix multiwindow extwm mode to build again
Build and link with rootless extension
Update Xwin code for removal of RootlessAccelInit()
Fix Xwin code which now has a collision with the type name EventType

Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 18:00:03 +01:00
Jon TURNEY
638ca9a7a2 Cygwin/X: Avoid a visual glitch on window move in rootless modes
Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow
(this avoids a white flickering on window resize)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 17:54:40 +01:00
Jon TURNEY
b718b2e088 Cygwin/X: Allow pointer warping to work in rootless modes
Mouse pointer warping in multiwindow/rootless mode was never implemented,
due to concerns that moving the mouse pointer without asking might be rude

This patch allows X applications to move the mouse pointer in rootless modes,
Let's hope they don't abuse this privilege ;-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 17:54:38 +01:00
Jon TURNEY
85614946ba Cygwin/X: Improve mouse tracking for moving/resizing undecorated windows
In -multiwindow mode, tell Windows we wish to capture the mouse when a button
is down.  This causes Windows to continue to send movement events for the mouse
even if the mouse pointer moves outside the window frame.

This helps greatly with undecorated windows which have regions you can grab
to move (e.g. gmplayer, xine control panels) or resize (e.g. Songbird) the
window, as it means the window continues to receive the mouse motion even if the
mouse pointer  moves out of the window (which presumably happens if we don't
manage to update the window fast enough to track the mouse pointer)

Consolidate the multiple instances of the code to start the mouse position
polling timer into a new function winStartMousePolling(), and use that to
restart the polling timer when we release the mouse.

Also, start the timer on WM_SHOW, so that xeyes will track the mouse position
when it is first shown, even if the mouse doesn't enter it's window
(You probably need focus-stealing turned off to see this problem)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 17:54:35 +01:00
Yaakov Selkowitz
f351c10a97 Cygwin/X: Man page fixes
Correct path names in man pages, using cpprules.in
Install XWinrc man page into section 5

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 17:54:33 +01:00
Adam Jackson
5c1afac5ee EDID: Fix timing class names to match the spec 2009-06-29 11:17:59 -04:00
Peter Hutterer
bf0f3b8f2b test: fix build error introduced by XINPUT_ABI 7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-29 13:31:19 +10:00
Thomas Jaeger
cbeb6a73c4 dix: report subpixel coordinates for high-resolution devices
Acked-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-29 12:20:49 +10:00
Simon Thum
069b4c5f0a dix: make part of ptrveloc.h internal
Though this is a SDK header, some functions are intended solely
for the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-29 12:20:49 +10:00
Simon Thum
2830e84937 dix: rename pDev->dev, pVel->vel for consistency
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-29 12:20:49 +10:00