Commit Graph

4093 Commits

Author SHA1 Message Date
Daniel Stone
3633ae6efb Damage: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone
2761c10331 OS: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone
2d738efb95 RandR: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone
3c1d2fdeff Record: Remove usage of alloca
Replace with xalloc/xfree.
2007-11-05 14:34:41 +00:00
Daniel Stone
e0491f470e Render: Remove usage of alloca
Replace it with heap-based allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone
59774af86b XKB: Remove usage of alloca
alloca has no way to return failure, and instead can possibly arbitrarily
overflow the stack.  Let's avoid that one.
2007-11-05 14:34:41 +00:00
Ben Byer
6e4f5cf83f changing ALLOCATE_LOCAL to xalloc to prevent stack overflow 2007-11-05 05:53:34 -08:00
Ben Byer
b1764ddf13 pulling more patches over from xorg-xserver-1.2-apple branch 2007-11-05 05:45:21 -08:00
Ben Byer
10fde62fc8 more CVS tags 2007-11-05 05:45:21 -08:00
Ben Byer
27ecb89250 Removed CVS tags. 2007-11-05 05:45:21 -08:00
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Markku Vire
3f1b6765aa Config: HAL: Touchpads are pointers too
Treat touchpads -- not just mice -- as pointer devices.
2007-11-04 16:46:21 +00:00
Mark Vytlacil
41c3069f7c XFree86: Input: Save/restore errno around SIGIO (bug #10683)
Make sure errno is saved and restored from the SIGIO handler, so errors
from system calls in input handlers don't break the interrupted code.
2007-11-04 16:46:21 +00:00
Ben Byer
ff9929ed48 pulling in changes from xorg-server-1.2-apple branch 2007-11-04 05:13:19 -08:00
Ben Byer
181468db92 add missing null-pointer checks 2007-11-04 04:50:26 -08:00
Matthias Hopf
4d0f35c81d Always duplicate mode name when duplicating a mode.
If the originating mode didn't have a name, we would end up with the name of
the original mode being setup correctly, but with the name of the copy still
being NULL.
2007-11-02 19:27:32 +01:00
Adam Jackson
dfb1cce28a Restore build of xf8_16bpp.
It doesn't link against cfb, so don't conditionalize its build against cfb.
2007-11-02 12:51:56 -04:00
Kristian Høgsberg
7a0555e9bb Fix crash in xf86InitOrigins()
In a multihead setup, if only the first screen can be
initialized, but the second screen is mentioned first in the
ServerLayout section, the xf86InitOrigins() function will crash
because the screen referred to in the e.g. "RightOf" part is
non-existent.
2007-11-02 12:06:09 -04:00
Adam Jackson
5b41d4e60b Don't filter modes away during VBE mode list construction.
Pass all VBE modes back up to the driver, on the assumption that it
knows how to filter modes intelligently.
2007-11-02 12:05:58 -04:00
Adam Jackson
c095da04fe Fix magic number in fbdevhw
The transformation between fbdev and xfree86 mode timings needs to be
invertible, otherwise Xen and other framebuffers that don't have real
pixel clocks won't initialize.
2007-11-02 12:05:41 -04:00
Adam Jackson
f4fe66f676 Disable explicit commenting in Monitor section. 2007-11-02 12:05:22 -04:00
Adam Jackson
22f0e3a8b0 Avoid PS/2 protocol probing for /dev/input/mice
The kernel will always upconvert to ExplorerPS/2 for all readers of
/dev/input/mice, so don't waste time on startup trying to figure
that out.
2007-11-02 12:04:56 -04:00
Adam Jackson
b97518666d Fix accidental ABI usage in RANDR 1.2 drivers.
Due to RANDR 1.2, xf86findOptionValue and xf86nameCompare are now ABI.
Make sure they're exported from the server.
2007-11-02 12:04:29 -04:00
Adam Jackson
f01e149d1a Move SIGUSR1 notification as late as possible.
If we inherited a signal mask from the parent process that ignores SIGUSR1,
then we will send SIGUSR1 to the parent to indicate when we're ready to
accept connections.  Unfortunately, we send this notification way too
early, right after creating the sockets rather than just before entering
the main loop.

Move it to just before Dispatch() so we're not lying quite so much.
2007-11-02 11:54:16 -04:00
Adam Jackson
a2ee5fe0c4 Enable MIT-SHM in Xdmx.
The extension is entirely DIX-level, no new DDX changes needed.
2007-11-01 13:47:17 -04:00
Arjan van de Ven
2338d5c991 reduce wakeups from smart scheduler
The smart scheduler itimer currently always fires after each request
(which in turn causes the CPU to wake out of idle, burning precious
power). Rather than doing this, just stop the timer before going into
the select() portion of the WaitFor loop. It's a cheap system call, and
it will only get called if there's no more commands batched up from the
active fd.

This change also allows some of the functions to be simplified;
setitimer() will only fail if it's passed invalid data, and we don't do
that... so make it void and remove all the conditional code that deals
with failure.

The change also allows us to remove a few variables that were used for
housekeeping between the signal handler and the main loop.

Signed-off-by: Keith Packard <keithp@koto.keithp.com>
2007-10-30 11:18:56 -07:00
Kristian Høgsberg
692654b430 Set up visuals for the existing X visuals.
This makes the root visual a GLX capable visual again and adds a GLX visual
for the COMPOSITE ARGB visual cleanly (as opposed to the hack we had before).
2007-10-29 18:14:18 -04:00
Kristian Høgsberg
a5546a99ac Change the GLX module to initialize after COMPOSITE.
This changes the module initalization order so that the GLX module initializes
after COMPOSITE.  The reason for this change is to be able to initialize a
GLX visual config for the COMPOSITE ARGB visual.
2007-10-29 18:14:18 -04:00
Peter Hutterer
8ead41388e xfree86: wrap keyboard devices for XKB.
Call ProcessOtherEvents first, then for all keyboard devices let them be
wrapped by XKB. This way all XI events will go through XKB.

Note that the VCK is still not wrapped, so core events will bypass XKB.

(cherry picked from commit d627061b48)
2007-10-28 17:31:07 +02:00
Daniel Stone
e717cf08e9 XKB: Cope with all events in XkbProcessKeyboardEvent
Cope with Xi and pointer events in the (now increasingly misnamed)
XkbProcessKeyboardEvent.  If it's the wrong type, call through the wrapping
chain to get out; else, process it.
2007-10-28 17:31:05 +02:00
Daniel Stone
9db8846fa5 XKB: Don't update indicators on all devices, add missing include file
Don't get XkbUpdateIndicators to update the indicators on all our devices: we
already deal with that ourselves.
Add exevents.h include to get more (proto)types.
2007-10-28 17:30:47 +02:00
Peter Hutterer
ee3aa948eb xkb: Unwrap properly in ProcessPointerEvent.
Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly
and then call the unwrapped processInputProc. Seems to be a better idea,
especially since it makes stuff actually work...
(cherry picked from commit 8f9bf927e1)
2007-10-28 17:19:10 +02:00
Peter Hutterer
d3588a0aee xkb: xkbHandleActions: let wrapping take care of event delivery.
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
(cherry picked from commit 32d0440c7f)
2007-10-28 17:17:26 +02:00
Peter Hutterer
352c5a3112 dix: don't compress motion events from different devices (EventEnqueue)
(cherry picked from commit 8840829ab9)
2007-10-28 16:07:30 +02:00
Peter Hutterer
8d3d027062 dix: add XI event support to FixKeyState.
FixKeyState needs to be able to handle XI events, otherwise we get "impossible
keyboard events" on server zaps and other special key combos.
(cherry picked from commit 5ee409794e)
2007-10-28 16:05:04 +02:00
Peter Hutterer
99e826e867 xkb: enable XI event processing for xkb.
XI events can now take the same processing paths as core events, and should do
the correct state changes etc.

There's some cases where XKB will use KeyPress as type for an event to be
delivered to the client. Stuck warnings in, not sure what the correct solution
is yet.

(cherry picked from commit 6334d4e7be with some
 additional compile fixes and non-MPX adaptations)
2007-10-28 16:04:43 +02:00
Peter Hutterer
91077bfc50 Save processInputProc before wrapping it and restore it later, instead of
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to
process DeviceKeyEvents after the first key press.

This should be the correct fix now.
(cherry picked from commit 4d5df14f2c)
2007-10-28 15:51:34 +02:00
Peter Hutterer
8b9481a113 xkb: Store the action filters per device in the XkbSrvInfoRec.
Using a global array for action filters is bad. If two keyboard hit a modifier
at the same time, releaseing the first one will deactivate the filter and
thus the second keyboard can never release the modifier again.
(cherry picked from commit bfe6b4d2d9)
2007-10-28 15:51:10 +02:00
Daniel Stone
493b83bd09 XFree86: Remove ridiculous SIGIO debugging
YOU PRESSED A KEY
AND AGAIN
YOU RELEASED A KEY
AND AGAIN
YOU PRESSED A KEY
AND AGAIN

... not so much.
2007-10-28 15:50:18 +02:00
Daniel Stone
a3d48de5f2 XKB: Add more bits to xkbsrv.h
Add the device private index, given we use that in a macro here, and also the
prototype for xkbUnwrapProc, since that's also useful.
2007-10-28 15:50:03 +02:00
Daniel Stone
e29e69960d Xi: Include XI protocol header in exevents.h
Make sure we have all the types we need to use this header.
2007-10-28 15:49:56 +02:00
Daniel Stone
df57ae1639 configure.ac/XFree86: Only build XF86Misc and XF86VidMode when appropriate
Don't build XF86Misc or XF86Vidmode in hw/xfree86/dixmod when it's been
explicitly disabled in configure, or we don't have the proto modules
installed.
2007-10-28 15:46:26 +02:00
Aaron Plattner
2251572062 Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow acceleration architectures to wrap above miGlyphs. 2007-10-26 15:14:03 -07:00
Kristian Høgsberg
497aba8949 Weed out some unused fluff from __GLXcontext. 2007-10-26 11:25:57 -04:00
Bernardo Innocenti
0e749ceab4 Include stddef.h for size_t.
This is required by a buggy version of the openssl/sha.h header
which is distributed with Fedora 7.
2007-10-26 10:55:48 -04:00
Kristian Høgsberg
80d8a3e176 Quiet glx visual debug info. 2007-10-26 10:20:50 -04:00
Matthias Hopf
27b13eeb56 Nuke superfluous ",", added missing include for xf86i2c.h. 2007-10-26 13:15:07 +02:00
Daniel Stone
6d59bb5709 XFree86 Misc/VidMode: Remove ridiculous debug ErrorFs
When we're building with --enable-debug, don't emit an ErrorF every time a
function gets called.
2007-10-26 09:12:38 +03:00
Kristian Høgsberg
f62277d421 Clean up unused pVisual part of __GLXcontext. 2007-10-25 18:49:02 -04:00
Kristian Høgsberg
30bcaa966d Make glx destroy path handle cases where the X window goes away first. 2007-10-25 18:49:02 -04:00