Commit Graph

3752 Commits

Author SHA1 Message Date
Magnus Vigerlöf
a68d0ef4a6 dix: Skip call to clipAxis for relative core-events
Relative events that generates both core and extention
events will have its axis cliped and screen changed by
miPointerSetPosition when the events are processed. For
absolute and non core-generating relative events the
axis must be clipped if we shouldn't end up completely
outside the defined ranges (if any).
(cherry picked from commit a0284d577a)
2008-05-07 19:22:35 +02:00
Magnus Vigerlöf
b51ca35a75 Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events
Restore the rescaling code for x and y axis when generating
motion events.
(cherry picked from commit d9e23c4ff1)
2008-05-07 19:22:29 +02:00
Magnus Vigerlöf
1d79ba8193 Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents
Don't use a possitive value as a marker for if a max-value
is defined on the valuators. Use the existence of a valid
value range instead. This will also make it possible to
define arbitrary start and end-values for min and max as
long as min < max.
(cherry picked from commit f04c083869)
2008-05-07 19:22:23 +02:00
Magnus Vigerlöf
7fa7031cfa dix: Always add valuator information if present
Send valuator information for all event types, not only for
MotionEvents and absolute button events.
(cherry picked from commit 12e5324032)
2008-05-07 19:22:16 +02:00
Alan Coopersmith
b95befdfd2 Check for <sys/sdt.h> as well when determining to enable dtrace probes
Avoids auto-detecting dtrace is present on systems with the ISDN trace tool
named dtrace installed, but not the dynamic tracing facility named dtrace
2008-05-06 20:57:41 -07:00
Ben Byer
0fab9843c7 So, like, checking return codes of system calls (signal, etc) is good.
Also, only restore an old signal handler if one was actually set
(prevents the server from dying on OS X).
2008-05-06 20:55:23 -07:00
Eric Anholt
a02b989c68 Fix build on FreeBSD after Popen changes. 2008-05-06 20:55:19 -07:00
Adam Jackson
6a5066c2e9 Ignore - not just block - SIGALRM around Popen()/Pclose().
Because our "popen" implementation uses stdio, and because nobody's stdio
library is capable of surviving signals, we need to make absolutely sure
that we hide the SIGALRM from the smart scheduler.  Otherwise, when you
open a menu in openoffice, and it recompiles XKB to deal with the
accelerators, and you popen xkbcomp because we suck, then the scheduler
will tell you you're taking forever doing something stupid, and the
wait() code will get confused, and input will hang and your CPU usage
slams to 100%.  Down, not across.
2008-05-06 20:55:15 -07:00
Peter Hutterer
ff4006bd5a xfree86: fix AlwaysCore handling. (Bug #14256)
Assume AlwaysCore being set by default, just like the other options.

X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256>
(cherry picked from commit 5b8641a5fd)
2008-04-30 12:53:38 +02:00
Thomas Jaeger
fdfb57d342 XKB: Fix processInputProc wrapping
If input processing is frozen, only wrap realInputProc: don't smash
processInputProc as well.  When input processing is thawed, pIP will be
rewrapped correctly.

This supersedes the previous workaround in 50e80c9.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 37b1258f0a)
2008-04-30 11:21:11 +02:00
Pierre Willenbrock
6afcf996ca EXA: Fix off-by-one in polyline drawing.
(cherry picked from commit d502521c36)
2008-04-30 12:07:41 +03:00
Tilman Sauerbeck
9e9eeca2b0 Fixed configure.ac for autoconf 2.62.
(cherry picked from commit 3c337e18b9)
2008-04-30 10:17:55 +02:00
Hasso Tepper
dd6b0de38d configure.ac: DragonFly BSD support
Add support for DragonFly BSD, which is just the same as FreeBSD for all
of these cases.
(cherry picked from commit 0f87b41a43)
2008-04-07 14:11:28 +03:00
Jeremy C. Reed
76b950cd6e Add some more support for DragonFly. From Joerg Sonnenberger
and pkgsrc.
(cherry picked from commit 1d4bea6106)
2008-04-07 14:10:01 +03:00
Alan Hourihane
a65d4aed06 Fix context sharing between direct/indirect contexts 2008-02-27 16:53:52 +00:00
Matthias Hopf
44f46bfb98 CVE-2007-6429: Always test for size+offset wrapping. 2008-02-20 22:17:42 +01:00
Kristian Høgsberg
bcbfd619f8 Don't break grab and focus state for a window when redirecting it.
Composite uses an unmap/map cycle to trigger backing pixmap allocation
and cliprect recomputation when a window is redirected or unredirected.
To avoid protocol visible side effects, map and unmap events are
disabled temporarily.  However, when a window is unmapped it is also
removed from grabs and loses focus, but these state changes are not
disabled.

This change supresses the unmap side effects during the composite
unmap/map cycle and fixes this bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=488264

where compiz would cause gnome-screensaver to lose its grab when
compiz unredirects the fullscreen lock window.
2008-02-20 22:15:11 +01:00
Maarten Maathuis
dc30ade649 Fix rotation for multi-monitor situation.
- The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
- Fix bug #13787.
(cherry picked from commit a48cc88ea2)
2008-02-19 21:58:26 +02:00
Maarten Maathuis
3db5930c61 Resize composite overlay window when the root window changes.
- This allows some compositing managers to work, even after randr12 has changed the root window size.
- Thanks to ajax for figuring out the best place to put this.
- Example:
	- xf86RandR12SetMode() calls EnableDisableFBAccess().
	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
	- The final step is the call to PositionWindow().
(cherry picked from commit 70c0592a97)
2008-02-19 21:58:21 +02:00
Eamon Walsh
74b40bba32 security: Fix for Bug #14480: untrusted access broken in 7.3. 2008-02-14 19:47:44 -05:00
Peter Hutterer
bc72ef3a15 xkb: don't update LEDs if they don't exist. (Bug #13961)
In some weird cases we call this function when there is no SrvLedInfo on the
device. And it turns out null-pointer dereferences are bad.

X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961>
(cherry picked from commit d954f9c803)
2008-01-31 11:39:10 +11:00
Peter Hutterer
e98027c3ac dix: set the correct number of valuators in valuator events.
(first_valuator + num_valuators) must never be larger than the number of axes,
otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is
wrong too.
(cherry picked from commit 9f6ae61ad1)
2008-01-29 14:46:30 +11:00
Adam Jackson
b6d4cdf64f CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps.
Move size validation after depth validation, and only validate size if
the bpp of the pixmap format is > 8.  If bpp < 8 then we're already
protected from overflow by the width and height checks.
(cherry picked from commit e9fa7c1c88)
2008-01-18 21:01:32 +01:00
Matthieu Herrb
19b95cdd1d Fix for CVE-2007-5958 - File existence disclosure. 2008-01-17 17:03:39 +01:00
Matthieu Herrb
f09b8007e7 Fix for CVE-2008-0006 - PCF Font parser buffer overflow. 2008-01-17 17:02:52 +01:00
Matthieu Herrb
8b14f7b742 Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. 2008-01-17 17:02:36 +01:00
Matthieu Herrb
d244c8272e Fix for CVE-2007-6427 - Xinput extension memory corruption. 2008-01-17 17:02:04 +01:00
Matthieu Herrb
4848d49d05 Fix for CVE-2007-6428 - TOG-cup extension memory corruption. 2008-01-17 17:00:22 +01:00
Matthieu Herrb
59a3b83922 Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index 2008-01-17 17:00:06 +01:00
Daniel Stone
636aa9e7be Xephyr: One-time keyboard leak fix
Don't leak the originally-allocated keysym map.
(cherry picked from commit e85130c85f)
2008-01-17 18:43:30 +11:00
Daniel Stone
8a3acd3ec4 XKB: XkbCopyKeymap: Don't leak all the sections
Previously, we'd just keep num_sections at 0, which would break the
geometry and lead us to leak sections.  Don't do that.
(cherry picked from commit 0137b0394a)
2008-01-17 18:43:27 +11:00
Daniel Stone
02e805f0ff OS: IO: Zero out client buffers
For alignment reasons, we can write out uninitialised bytes, so allocate
the whole thing with xcalloc.
(cherry picked from commit b99a43dfe9)
2008-01-17 18:43:24 +11:00
Peter Hutterer
60144ac814 include: never overwrite realInputProc with enqueueInputProc. Bug #13511
In some cases (triggered by a key repeat during a sync grab) XKB unwrapping
can overwrite the device's realInputProc with the enqueueInputProc. When the
grab is released and the events are replayed, we end up in an infinite loop.
Each event is replayed and in replaying pushed to the end of the queue again.

This fix is a hack only. It ensures that the realInputProc is never
overwritten with the enqueueInputProc.

This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511)
(cherry picked from commit eace88989c)
(cherry picked from commit 50e80c3987)
2007-12-29 00:14:12 +02:00
Daniel Stone
102c012c20 Input: Don't reinit devices
If a device is already initialised (i.e. the virtual core devices) during
IASD, don't init them again.  This fixes a leak.
(cherry picked from commit 1f6015c8fe62c28cfaa82cc855b5b9c28fd34607)
2007-12-28 15:51:05 +02:00
Daniel Stone
a304fc1d4a KDrive: Xephyr: Don't leak screen damage structure
(cherry picked from commit 0b03d97a244540824c922c300adbc3d3ae4855d5)
2007-12-28 15:51:00 +02:00
Daniel Stone
38d8cfaaff OS: Don't leak connection translation table on regeneration
(cherry picked from commit e868e0bc0d2318e62707d3ae68532b0029959154)
2007-12-28 15:50:56 +02:00
Daniel Stone
30fc8053a5 Config: HAL: Don't leak options on failure to add device
This showed up in Xephyr in particular, which denies new device requests.
(cherry picked from commit 2bb199056edf6c63cf978d1a8ad49a57ce1938f3)
2007-12-28 15:50:52 +02:00
Daniel Stone
81c5950d0a Config: D-Bus: Don't leak timers
TimerCancel doesn't free the timer: you need TimerFree for that.
(cherry picked from commit 25deaa7e6b29b3913b35efa39b9c8b25de5e6d95)
2007-12-28 15:50:49 +02:00
Arkadiusz Miskiewicz
d988da6eee Xprint: Clean up generated files
Remember to clean generated wrapper files.
(cherry picked from commit 977fcdea8198906936a64b8117e6a6d027c617e3)
2007-12-13 00:09:15 +02:00
Hong Liu
41f735fbe0 bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff
This patch should fix bug 8080.
(cherry picked from commit 9adea80703)
2007-12-13 00:00:27 +02:00
Hong Liu
f4bcb53e86 Bug 13308: Verify and reject obviously broken modes.
(cherry picked from commit c6cfcd408d)
2007-12-12 23:59:54 +02:00
Daniel Stone
d63efecc94 Bump to 1.4.0.90 2007-12-12 21:57:59 +02:00
Bartosz Fabianowski
446efcc554 Input: Fix proximity events with valuators
Initialise num_events to 1, so we always send a proximity event, and then
optionally valuator events.  Also make sure mieq can deal with valuator
events sent after proximity events.
(cherry picked from commit 2dcfab37d38c0c72e9be7cc724047405c8029e88)
2007-12-07 02:38:44 +00:00
Daniel Stone
9f4689173e KDrive: Xephyr: Fix non-GLX builds
Only set noGlxExtension if we're actually building GLX.
2007-12-06 00:46:32 +00:00
Daniel Stone
d37351308b XKB: Actions: Don't run certain actions on the core keyboard
Don't run VT switches, terminations, or anything, on the core keyboard: only
run actions which affect the keyboard state.  If we get an action such as VT
switch, just swallow the event.
(cherry picked from commit 320abd7d1d)
2007-12-06 00:30:02 +00:00
Daniel Stone
27da1367c9 WaitForSomething: Ignore EAGAIN
If select ever returns EAGAIN, don't bother complaining.
(cherry picked from commit 85dd8efac1)
2007-12-06 00:30:01 +00:00
Rich Coe
259f86b13b OS: Connection: Keep trying select while it gets interrupted (bug #9240)
If we got interrupted (EINTR or EAGAIN) during select, just try again, rather
than shutting clients down on either of these errors.
(cherry picked from commit b7f3618f39)
2007-12-06 00:30:01 +00:00
Rich Coe
90649e6a39 OS: Connection: Don't shut down disappeared clients (bug #7876)
If a client disappears in the middle of CheckConnections (presumably
because its appgroup leader disappears), then don't attempt to shut it down
a second time, when it's already vanished.
(cherry picked from commit d8b2cad377)
2007-12-06 00:30:01 +00:00
Kanru Chen
25d26b55e7 Config: HAL: Fix XKB option parsing
Actually combine the XKB options into a string, rather than just repeatedly
writing a comma.
(cherry picked from commit da893908feb2dcf7c22420b3426ab3ac65c7ca99)
2007-12-03 12:46:50 +00:00
Peter Harris
b037e4a5ab Add missing swaps in panoramiXSwap.c
(cherry picked from commit cb67a10b7f6f564e0345de19316934361ea28720)
2007-11-30 20:42:28 +02:00