Commit Graph

811 Commits

Author SHA1 Message Date
Olivier Blin
7f027d9dc0 kdrive: add protocol mouse option
kdrive probes a lot of PS/2 protocols for the mouse device, which
makes the mouse unusable for some seconds after X startup.
This new "protocol" option allows forcing the mouse protocol.
It can be used this way:
Xfbdev -mouse mouse,,protocol=ps/2 -keybd keyboard

Signed-off-by: Olivier Blin <blino@mandriva.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-03 15:51:13 +10:00
Peter Hutterer
b1b5ec45c1 kdrive: set Activate/Deactivate grab for input devices (#21591)
X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591>
2009-05-16 12:01:22 +10:00
Eamon Walsh
57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
David Jander
d9bf52b4ab [kdrive] Fix rotation of pointer
Rotation matrix for pointer coordinates was incomplete and pointers with
absolute coordinates did not work correctly in xserver (kdrive) when the
sceen was rotated other than by 0 degrees.

Signed-off-by: David Jander <david.jander@protonic.nl>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2009-04-17 01:34:18 -04:00
Alan Coopersmith
a0b6a363dc Lift fatal signal handlers from DDX'es up to a common DIX implementation
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-09 17:10:12 -07:00
David Jander
5f769b7344 kdrive: Fix segfault in tslib support 2009-04-06 13:01:08 -04:00
Adam Jackson
2d0a4fff79 DPMS: Remove unused DPMSGet() 2009-04-03 18:22:20 -04:00
Adam Jackson
d2690375df kdrive: s/KdSaveString/strdup/g
This isn't even funny anymore.
2009-04-03 11:08:31 -04:00
Michel Dänzer
4bf707f018 Revert "Fix up Xephyr build for recent EXA changes."
This reverts commit 4e8d98b61e.
2009-02-27 16:37:27 +01:00
Michel Dänzer
4e8d98b61e Fix up Xephyr build for recent EXA changes.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-25 10:26:36 +01:00
Adam Jackson
970725d23e kdrive: Nuke dead AGP and VGA code. (#19921) 2009-02-16 18:44:00 -05:00
Alan Coopersmith
5623c27700 Constify atom name strings
Changes MakeAtom to take a const char * and NameForAtom to return them,
since many callers pass pointers to constant strings stored in read-only
ELF sections.   Updates in-tree callers as necessary to clear const
mismatch warnings introduced by this change.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03 10:06:00 -08:00
Jim Huang
66a6fbbfa3 kdrive: Move a close() to the right place so we don't close(-1) normally.
Bug #18343
2009-02-01 09:19:20 -08:00
Paulo Cesar Pereira de Andrade
f7585d0205 Convert kdrive libraries to libtool convenience libraries.
Also correct a link failure due to unresolved symbols. This
is arguably a libtool/ranlib/ld bug, that "may" be corrected
by linking all convenience libraries in a single one. But in
this case, it was preferred to just add a linker option  to
Xfake_LDFLAGS, to force linkage of all libraries.

  This corrects #19725.
2009-01-27 03:13:28 -02:00
Adam Jackson
759348f13f Xephyr: Add some rudimentary Xnest command line compat 2009-01-22 22:11:15 -05:00
Daniel Stone
4fa3872dc2 Input: Remove core keysyms from KeyClassRec
Instead of always keeping two copies of the keymap, only generate the
core keymap from the XKB keymap when we really need to, and use the XKB
keymap as the canonical keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:59 +11:00
Daniel Stone
32db27a7f8 Input: Remove modifierMap from core
We already have modmap (in the exact same format!) in XKB, so just use
that all the time, instead of duplicating the information.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
6727ee9408 Input: Remove state from KeyClassRec
We already have state fully stored within XKB, so instead of duplicating it,
just generate the values to send to clients when required.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
08363c5830 Input: Overhaul keyboard initialisation process
XkbInitKeyboardDeviceStruct is now the only valid keyboard
initialisation: all the details are hidden behind here.  This now makes
it impossible to supply a core keymap at startup.

If dev->key is valid, dev->key->xkbInfo->desc is also valid.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:51 +11:00
Daniel Stone
40877c6680 XKB: Make XKB mandatory
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:06:25 +11:00
Daniel Stone
f9da417163 Xephyr: Disable state inheritance hack
Prepare for the impending removal of the state field by disabling this hack
for a while: it's hell of nasty and I'm amazed it ever really worked.

Basically, on focus out, it should do as current DDXes do and fake releases
for all keys (not just mangle the core state) that are currently down;
buttons too.  When focus comes back in, we already have a KeymapNotify that
lets us know what's currently down, so we can use this to fake the
appropriate keypresses, and send it through the event routing layer.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-22 14:23:24 +11:00
Owen W. Taylor
a058192d97 Xephyr: Fix crash with control-shift and GLX (#18185)
When we are looking up the screen for an event, we need to take
into account the fact that the event may have been delivered to the
"peer window" that we create when implementing GLX. Since we only
ever create one such window per screen, just add a single peer_win
field to EphyrHostScreen.
2008-12-16 11:50:46 -05:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Jeremy Uejio
416685c295 Refix Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode
<http://bugs.opensolaris.org/view_bug.do?bug_id=6685465>

This is a refix of the previous fix for CR 6685465.  In the first fix
I was shifting the colors to match the mask by the bits_per_rgb amount
in the visual structure.  That field has nothing to do with the # of
bits to shift by.  I should just instead shift the bits to match the mask.
2008-11-25 16:31:11 -08:00
Alan Coopersmith
dacad9ae0b Xephyr man page typo fixes.
Also trailing white space removal to clear git warnings.
2008-11-21 17:16:22 -08:00
Matthieu Herrb
6a1b2fed7e Add a man page for Xephyr, with information from the README file. 2008-11-21 18:21:18 +01:00
James Cloos
b3c7e62664 Remove some null statements.
Remove several doubled statement-terminal semicolons.

Reported by Fernando Carrijo.
2008-11-08 12:21:20 -05:00
Adam Jackson
6d21fbf006 kdrive: Bye bye Xvesa 2008-11-05 11:39:46 -05:00
Adam Jackson
3eb52de7f2 kdrive: Hardcode a different wrong value for number of mouse buttons
This should really come from the input driver directly, but, kdrive.
2008-10-14 09:46:04 -04:00
Peter Hutterer
18cdd733ad kdrive: fix dixflags so they're always defined before enqueuing events #17734
If absolute events were posted, dixflags got set conditionally on whether the
valuators are different from the last posted set of values.
If dixflags are undefined however, the DIX interprets them as relative
valuators. Fix this by making sure defining dixflags is always defined.

X.Org Bug 17724 <http://bugs.freedesktop.org/show_bug.cgi?id=17734>
2008-10-10 16:58:08 +10:30
Peter Hutterer
d58f2c30c6 kdrive: lastx/y needs to be set to the event coordinates #17728
X.Org Bug 17728 <http://bugs.freedesktop.org/show_bug.cgi?id=17728>
2008-10-10 16:58:08 +10:30
Adam Jackson
2c5332872f s/kdDontZap/kdAllowZap/ 2008-10-08 13:39:49 -04:00
Daniel Stone
d80bae2237 Update docs to reflect new DontZap default 2008-10-08 02:44:08 +03:00
Adam Jackson
42e7b64bf9 -retro enables zapping 2008-10-07 20:32:02 -04:00
Daniel Stone
9d135ac10a Input: Make DontZap the default
If you need to bail out the server, use Ctrl-Alt-Fx, or enable zapping
if it bothers you that much.  If Ctrl-Alt-Fx is broken, nag me until
it's permanently fixed.
2008-10-08 02:30:05 +03:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson
0b7b89fbac xalloc+bzero -> xcalloc 2008-10-06 14:19:30 -04:00
Tomas Carnecky
ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Adam Jackson
0ce687634f Eviscerate save-under support.
Use a compositing manager already.  Plus I really wanted to use 'eviscerate'
in a commit message.
2008-08-13 17:28:08 -04:00
Tomas Carnecky
5532d63488 Redefine WindowTable as a fixed array
Instead of xalloc'ing it every server generation. The array is always
the same size (MAXSCREENS), anyway.
2008-08-05 01:17:32 +03:00
Adam Jackson
9757106bba Remove all empty extension reset hooks, replace with NULL. 2008-07-24 15:46:08 -04:00
Adam Jackson
b699364b1c Unifdef VXWORKS. 2008-07-23 11:44:07 -04:00
Dodji Seketeli
92fdd01d8e [Xephyr] various X86_64 build cleanups 2008-07-23 01:07:29 +02:00
Dodji Seketeli
5de1867fbb [Xephyr] Fix #15839
Make sure the _XSERVER64 macro is not defined in Xlib client code.
That macro is meant to be define only on pure server code, when necessary.
2008-07-23 01:01:26 +02:00
Daniel Stone
16e40ecf43 Remove dead code, useless #defines, et al 2008-07-17 22:37:31 +03:00
Daniel Stone
446fe9eecd Dead code removal
Remove a whole bunch of code that was never built, be it entire files or
just dead ifdefs.
2008-07-17 21:37:50 +03:00
Daniel Stone
6c7c0ffeb7 KDrive: Delete rafts of unused code
Most of this stuff was gone with the last real hardware drivers that
used it.  Au revoir.
2008-07-17 20:45:01 +03:00
Daniel Stone
e6f35f28fb OS/KDrive/XFree86: Sanitise colour initialisation
OsInitColors always just returned TRUE, so just remove calls to it and
insane special-case logic.  Remove unused kcolor.c implementation, and
merge oscolor.h into oscolor.c since it was the only user.  Remove
open-coded strncasecmp in oscolor.c.

Since we no longer need to call OsInitColors after reading the config
file, just call PostConfigInit() from one place, and move PM handling to
one place so we can install the signal handlers earlier.
2008-07-16 01:38:22 +03:00
Peter Hutterer
2bbb12c355 Xi: remove ChangeDeviceControl for CoreCtl.
If you want to set a device to core, attach it to a master device.
2008-07-13 20:54:33 +09:30
Adam Jackson
689292e58c Fix GLX in Xvfb and kdrive. 2008-07-02 11:25:50 -04:00
Chris Ball
9a73bca859 Remove KdOffscreenMarkUsed() as all its callers are gone. 2008-07-02 09:46:06 -04:00
Adam Jackson
703a9645f3 Auf wiedersehen, KAA. 2008-07-01 17:50:48 -04:00
Jeremy Uejio
c8216aede6 Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode
<http://bugs.opensolaris.org/view_bug.do?bug_id=6685465>

This bug is caused by Xephyr not handling the RGB byte order correctly
of the server where Xephyr is displaying on. The previous code just
assumed that the order was RGB and did not take into account that
Xservers may use different order (such as BGR).

The fix is to add a function to calculate the byte order and bits
to shift based on the visual mask and the visual bits_per_rgb (which
is usually 8, but could be server dependent).  Since the shifts won't
change once the display connection has been made, I can cache these
values so that Xephyr doesn't have to keep recalculating them everytime
it tries to translate the Xephyr colormap entries for Xephyr clients to
the actual server colormap entries (i.e. calling the function
hostx_set_cmap_entry() repeatedly for every colormap entry).
2008-07-01 13:37:12 -07:00
Julien Cristau
b622f6dc5d kdrive: fix building with --disable-xv (bug#16488) 2008-06-23 23:45:57 +02:00
Peter Hutterer
656d5d9885 kdrive: fix wrong use of &, should be | instead.
Fallout from 26e7e69ab8
2008-06-11 17:32:59 +09:30
Peter Hutterer
585125685b ephyr: some whitespace changes. 2008-06-08 23:28:27 +09:30
Peter Hutterer
26e7e69ab8 kdrive: don't post motion event if there was no motion. #16179
Based on the patch by Tomas Janousek.

X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179>
2008-06-02 11:11:37 +09:30
Tiago Vignatti
5ba07cb548 kdrive: changes ephyr API according mpx merge.
This fix host-cursor in Xephyr server.

Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br>
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-06-02 10:27:12 +09:30
Peter Hutterer
f79ad5674e kdrive: fix up callers to KdQueueEvent, need to pass xEvent, not EventListPtr 2008-05-31 18:46:35 +09:30
Peter Hutterer
942086fc96 dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it 2008-05-31 18:17:49 +09:30
Peter Hutterer
26c1958c32 Merge branch 'master' into mpx 2008-05-26 17:37:31 +09:30
Peter Hutterer
0877de13ac Remove GetMotionProc from ValuatorClassRec.
With the MD/SD device hierarchy we need control over the generation of the
motion history as well as the conversion later before posting it to the
client. So let's not let the drivers change it.

No x.org driver currently uses it anyway, linuxwacom doesn't either so dumping
it seems safe enough.
2008-05-25 22:49:54 +09:30
George Sapountzis
ae0504d34d kdrive: need not export symbols for glx anymore 2008-05-23 22:40:25 +03:00
Dan Nicholson
c76fddeea2 Fix up paths for GL/glx -> glx renaming 2008-05-21 10:51:15 -07:00
George Sapountzis
255142b61e drop xprint remnants: InitGlobals 2008-05-21 18:13:09 +03:00
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
Conflicts:

	Xext/xprint.c (removed in master)
	config/hal.c
	dix/main.c
	hw/kdrive/ati/ati_cursor.c (removed in master)
	hw/kdrive/i810/i810_cursor.c (removed in master)
	hw/xprint/ddxInit.c (removed in master)
	xkb/ddxLoad.c
2008-05-20 10:20:14 +09:30
Adam Jackson
99e4531f7c The great kdrive purge.
Most of these drivers didn't work.  ati was the only one that even came
close.  The igs, ipaq, itsy, pcmcia, savage, sis530, trident, trio, ts300,
and vxworks directories have never built since modularisation, so clearly
no one can miss them.
2008-05-16 08:16:01 -04:00
Julien Cristau
9dfb525f6c kdrive: allow disabling Composite
KdInitOutput() used to enable Composite when it was disabled by default,
but now this hack prevents ``-extension Composite'' from working.
Remove it, as Composite is enabled by default anyway.
2008-05-11 23:35:41 +02:00
Aaron Plattner
d500eeb945 Xephyr: Handle depth 30 and reject higher depths rather than crashing. 2008-05-04 10:26:25 -07:00
Peter Hutterer
3344569529 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
2008-05-02 11:00:14 +09:30
George Sapountzis
00effad583 xephyr: XEPHYR_DRI is identical to XF86DRI 2008-04-23 18:11:56 +03:00
George Sapountzis
6a9f7f28ec xephyr: sync with mesa 2008-04-23 18:11:56 +03:00
George Sapountzis
7ffc68c5cc xephyr: libGL is client lib 2008-04-23 18:11:56 +03:00
George Sapountzis
a27c244d72 xephyr: Makefile cleanup 2 2008-04-23 18:11:56 +03:00
George Sapountzis
d4d19b2f22 xephyr: Makefile cleanup 1 2008-04-23 18:11:56 +03:00
George Sapountzis
efb723e166 glcore: prepare for dynamic loading
glcore gets linked with -ldl, -lpthread for s3tc and glapi
xserver needs
        DLOPEN_LIBS - to dlopen the glcore dso
        LD_EXPORT_SYMBOLS_FLAG - to export symbols for glcore to use

the ld flag is added to kdrive only when GLX is enabled, the net overhead for
Xephyr is ~155KB, could be reduced with --dynamic-list.
2008-04-23 18:11:55 +03:00
Ross Burton
e77f65768e Reuse the existing framebuffer mode in kdrive/fbdev
When starting up kdrive/fbdev, if the current framebuffer mode is sensible use
that unless told otherwise.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-22 18:07:46 +01:00
Ross Burton
c4fd112153 Add mediumraw support to the linux kdrive driver
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-22 18:05:53 +01:00
Ross Burton
455383db95 Enable the epson kdrive driver
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-22 18:04:31 +01:00
Ross Burton
20a90bef8b Add a default touchscreen path
When enabling the touchscreen, open /dev/input/touchscreen0 if no path was
specified.
2008-04-22 16:37:02 +01:00
Peter Hutterer
8190ef8754 Merge branch 'master' into mpx
Conflicts:

	Xext/EVI.c
	Xext/appgroup.c
	Xext/cup.c
	Xext/mitmisc.c
	Xext/sampleEVI.c
	dix/window.c
2008-04-22 18:04:05 +09:30
Eric Anholt
a7e3ad1c6b Remove NDEBUG (assert() disable) define from the X Server.
A few pieces of code were abusing this define for other purposes, which are
converted to #ifndef DEBUG instead.  There should be no ABI consequences
to this change.

The rationale is that having the define in xorg-server.h also disables
assert() drivers, which is unexpected, and also difficult to avoid since
xorg-server.h is included in their config.h, and you can't put a #undef in
config.h.  As for removing it from the server instead of moving it to an
internal header, we probably shouldn't have unnecessary assert()s in
critical server paths anyway, and if we do we could #define NDEBUG in the
specific cases needed.
2008-04-10 10:35:14 -07:00
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
David Nusinow
f028e245a7 Bug #10016: Implement WM_CLASS hints in Xephyr. 2008-03-24 16:06:33 -04:00
Dodji Seketeli
cdadd2ff9b [Xephyr/DRI] correctly route motion events targeted at GL drawable 2008-03-18 14:02:41 +01:00
Donnie Berkholz
aa231f28d5 Xephyr: Build fix: Port across XF86dri.c changes from Mesa. 2008-03-14 18:43:41 -07:00
Donnie Berkholz
a955c3b587 Xephyr: Distribute ephyrdriext.h in tarballs. 2008-03-14 18:43:40 -07:00
Peter Hutterer
4f2cd0ed96 Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.

Conflicts:

	Xi/opendev.c
	dix/devices.c
	dix/dixfonts.c
	dix/getevents.c
	dix/resource.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	mi/mipointer.c
	xkb/ddxBeep.c
	xkb/ddxCtrls.c
	xkb/ddxKeyClick.c
	xkb/ddxList.c
	xkb/ddxLoad.c
	xkb/xkb.c
	xkb/xkbAccessX.c
	xkb/xkbEvents.c
	xkb/xkbInit.c
	xkb/xkbPrKeyEv.c
	xkb/xkbUtils.c
2008-03-04 18:11:10 +10:30
Dodji Seketeli
d74b0327e8 [Xephyr/GL] unbreak the build
Don't touch Xephyr DRI stuff when not compiling in a DRI environment.
2008-02-27 09:48:53 +01:00
Adam Jackson
69f7826767 Match Xephyr DRI definitions to the ones in xf86dri.h 2008-02-22 16:04:35 -05:00
Adam Jackson
24bebdded4 fbFillRegionTiled() is now dead code.
Only ever called from the old PaintWindow* screen hooks, but those are
gone now.  As a pleasant side effect, fb loses its #ifdef PANORAMIX.
2008-02-22 15:22:38 -05:00
Dodji Seketeli
c14fd2a5cb [Xephyr/GL] properly route expose event on GL drawables
When an expose event happens on an host GL window paired with an
internal drawable, route that expose event to the clients listening
to the expose event on the internal drawable.
2008-02-21 15:33:02 +01:00
Dodji Seketeli
437c78ef9f [Xephyr/GL] don't crash when the host returns a NULL server string 2008-02-21 15:29:27 +01:00
Peter Hutterer
74628d6397 dix: change GetEventList to return length of list and set parameter in place.
Changing DDXs to use new prototype too.
2008-02-19 16:53:15 +10:30
Peter Hutterer
3fe64d8d27 Move input event list initialisation and storage from DDX to DIX.
Rather than letting the DDX allocate the events, allocate them once in the DIX
and just pass it around when needed.

DDX should call GetEventList() to obtain this list and then pass it into
Get{Pointer|Keyboard}Events.
2008-02-18 18:46:01 +10:30
Adam Jackson
f3b3b37ec6 Use strerror instead of errno values in user strings. 2008-02-14 07:52:02 +11:00
Benjamin Tissoires
6c38682084 kdrive: AddInputClient takes a ClientPtr. 2008-01-31 15:51:32 +10:30
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Daniel Stone
e85130c85f Xephyr: One-time keyboard leak fix
Don't leak the originally-allocated keysym map.
2008-01-17 18:43:06 +11:00
Tiago Vignatti
7a0d16ef0a Removed some warnings. 2008-01-15 03:27:16 -02:00
Tiago Vignatti
315d6a2b1d Fix Xephyr compilation without GLX. 2008-01-15 02:59:56 -02:00
Peter Hutterer
38bf01bd1c Merge branch 'master' into mpx 2008-01-10 13:38:46 +10:30
Richard Purdie
c31aead0fe [Kdrive] make XCalibrate 'orientation aware' 2008-01-08 12:31:47 +01:00
Peter Hutterer
8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
Daniel Stone
941058f8da KDrive: Xephyr: Don't leak screen damage structure 2007-12-28 15:51:36 +02:00
Otavio Salvador
8673033700 kdrive/ati: use operating system input devices 2007-12-14 13:15:27 +02:00
Otavio Salvador
e110255501 kdrive/vesa: use operating system input devices 2007-12-14 13:15:27 +02:00
Otavio Salvador
863ba390e9 kdrive/fbdev: use operating system input devices 2007-12-14 13:15:27 +02:00
Eamon Walsh
1c1a4bc970 devPrivates rework: more cleanup from previous merge operation. 2007-12-13 19:51:40 -05:00
Eamon Walsh
c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Peter Hutterer
28b93d74a1 ephyr: miPointerWarpCursor needs the device parameter.
Thanks to Mitchell Quille for spotting it.
2007-12-03 14:35:33 +10:30
Dodji Seketeli
be0cbe5a33 kaa: update kaaCreatePixmap to support the new usage_int 2007-11-20 15:39:49 +01:00
Eamon Walsh
2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Tiago Vignatti
4c9cc82fc4 For some reason "-nozap" appeared twice. Weird. 2007-11-15 01:46:11 -02:00
Eamon Walsh
1603130236 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/xace.c
	Xext/xace.h
2007-11-14 13:35:50 -05:00
Dodji Seketeli
26e1fc7b42 Xephyr: don't use Xv or GL when those are disabled. 2007-11-07 18:48:23 +01:00
Peter Hutterer
0b729051c0 Merge branch 'master' into mpx
Conflicts:

	Xi/extinit.c
	Xi/grabdev.c
	Xi/setmode.c
	Xi/ungrdev.c
	dix/devices.c
	dix/events.c
	dix/getevents.c
	include/dix.h
	mi/midispcur.c
	mi/misprite.c
	xkb/xkbActions.c
	xkb/xkbEvents.c
	xkb/xkbPrKeyEv.c
2007-11-07 15:37:23 +10:30
Dodji Seketeli
868e303630 Xephyr: fix a crash when using xrandr twice
* hw/kdrive/ephyr/ephyr.c:
          (ephyrScreenFini): don't forget to
          free shadowfb data (if necessary) upon server is reset.
2007-11-06 16:24:46 +01:00
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Dodji Seketeli
632c33c5c1 pull 'master' 2007-11-05 17:53:04 +01:00
Dodji Seketeli
6ff79ea5f7 Xephyr: fix some DRI build breakage 2007-11-05 16:46:49 +01:00
Daniel Stone
caf5450634 KDrive: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00: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
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Keith Packard
f2da10f7bc KDRIVE_LOCAL_LIBS includes some system libraries, not just internal x server libs 2007-10-17 10:51:02 +08:00
Dodji Seketeli
ab11bad547 Xephyr: remove a potential crasher
* hw/kdrive/ephyr/hostx.c:
	  (hostx_has_dri): be more defensive.
2007-10-04 13:05:29 +02:00
Dodji Seketeli
06c8977966 Xephyr: better handling of the -nodri option
* hw/kdrive/ephyr/ephyr.c:
          (ephyrInitScreen): try and detect when the host has no
          DRI support. In that case, switch to the -nodri behaviour.
          When in the -nodri case, make sure not to skip glx visual
          initialisation.
2007-10-04 13:01:24 +02:00
Dodji Seketeli
ea94f59e9b Xephyr: don't disable glx visual init by default
* hw/kdrive/ephyr/ephyrinit.c:
          (ddxProcessArgument): disabling visual init here
          is bad because it gets disabled even when we want
          to use software GL, leading to Xephyr :1 -nodri
          crashing in mesa.
2007-10-04 12:54:26 +02:00
Dodji Seketeli
a7f210e6fc Xephyr: fix a compiler warning 2007-10-04 12:51:08 +02:00
Dodji Seketeli
5d6eac1251 Xephyr: remove an unused variable 2007-10-04 12:47:05 +02:00
Dodji Seketeli
8018733c39 Xephyr: better compilation without GLX
* hw/kdrive/ephyr/ephyrinit.c: protect GLX related code with GLXEXT
	  macro
2007-10-04 12:06:19 +02:00
Dodji Seketeli
4ba76a7e2b Xephyr: port XV/GL stuff of the new multiscreen architecture
We can now launch GL or XV apps in any of the
        Xephyr screens we want.

	* hw/kdrive/ephyr/hostx.c,h:
	 (hostx_get_window):
	 (hostx_create_window): make these functions be screen
	 number aware.
	* hw/kdrive/ephyr/XF86dri.c : fix some compiler warnings.
	* hw/kdrive/ephyr/ephyrdri.c:
	 (ephyrDRIQueryDirectRenderingCapable),
	 (ephyrDRIOpenConnection),
	 (ephyrDRIAuthConnection),
	 (ephyrDRICloseConnection),
	 (ephyrDRIGetClientDriverName),
	 (ephyrDRICreateContext),
	 (ephyrDRIDestroyContext),
	 (ephyrDRICreateDrawable),
	 (ephyrDRIGetDrawableInfo),
	 (ephyrDRIGetDeviceInfo): in all those functions, don't forward
	 the screen number we receive - from the client - to the host X.
	 We (Xephyr) are always targetting the same X display screen, which is
	 the one Xephyr got launched against. So we enforce that in the code.
	* hw/kdrive/ephyr/ephyrdriext.c:
	 (EphyrMirrorHostVisuals): make this duplicate the visuals of the host X
	  default screen into a given Xephyr screen. This way we have a chance
	  to update the visuals of all Xephyr screen to make them mirror those
	  of the host X.
	 (many other places): specify screen number where required by the api
	 change in hostx.h.
	* hw/kdrive/ephyr/ephyrglxext.c: specify screen number where required
	 by the api change in hostx.h
	* hw/kdrive/ephyr/ephyrhostglx.c: don't forward the screen number we
	  receive - from the client - to the host X.
	  We (Xephyr) are always targetting the same
	  X display screen, which is
	 the one Xephyr got launched against. So we enforce that in the code.
	* hw/kdrive/ephyr/ephyrhostvideo.c,h: take in account the screen number received
	  from the client app. This is useful to know on which Xephyr screen we
	  need to display video stuff.
	* hw/kdrive/ephyr/ephyrvideo.c: update this to reflect the API change
	  in hw/kdrive/ephyr/ephyrhostvideo.h.
	  (ephyrSetPortAttribute): when parameters are not valid
	   - they exceed their validity range - send them to the host anyway
	   and do not return an error to clients.
	  Some host expose buggy validity range, so rejecting client for that
	  is too harsh.
2007-10-03 13:03:34 +02:00
Dodji Seketeli
dcb4db1bf5 Xephyr: glx fixlet
* hw/kdrive/ephyr/ephyrhostglx.c:
	  (ephyrHostGLXQueryVersion): properly query
	  the host for its gxl version.
2007-10-02 16:55:18 +02:00
Dodji Seketeli
6a435b0000 Xephyr: check presence of extensions in host X
* hw/kdrive/ephyr/hostx.c,h:
	  (hostx_has_xshape),
	  (hostx_has_glx),
	  (hostx_has_dri): added these new entry points
	* hw/kdrive/ephyr/ephyrdriext.c:
	  (ephyrDRIExtensionInit):
	  check presence of DRI and XShape extensions before
	  trying to use them.
	* hw/kdrive/ephyr/ephyrglxext.c:
	  (ephyrHijackGLXExtension):
	  check presence of glx extension before we use it.
2007-10-02 16:55:18 +02:00
Dodji Seketeli
2b217fc055 Xephyr: cleanup XF86dri.c a bit 2007-10-02 16:55:18 +02:00
Dodji Seketeli
f731b9da7d Xephyr: add -nodri and -noxv switches.
* hw/kdrive/ephyr/ephyr.c,ephyrinit.c::
	  add -nodri and -noxv to disable either DRI or XV.
	  When -nodri, mesa GL (non acceleretated) works.
2007-10-02 16:55:18 +02:00
Dodji Seketeli
5067439138 Kdrive: use fbcmap_mi.c instead of fbcmap.c
* hw/kdrive/src/Makefile.am: use fb/fbcmap_mi.c
	  and not fb/fbcmap.c. This allows kdrive to take advantage of
	  extensions redefining the entry points of  micmap.c stuff.
	  For instance it allows Xephyr to have a working GL, which is not
	  possible otherwise, because GL redefines mInitVisualsProc
	  to initialise its visuals.
2007-10-02 16:55:17 +02:00
Dodji Seketeli
ffe9ce6a84 Xephyr: fix a clipping issue xephyr-dri
* hw/kdrive/ephyr/ephyrdri.c:
	  (ephyrDRIGetDrawableInfo): force the back clipping rects
	  to equal the front clipping rects.
	* hw/kdrive/ephyr/ephyrdriext.c:
	  (ProcXF86DRIGetDrawableInfo): properly overclip the clipping rects we
	   got from the client. This bug fixes a clipping rect that was too
	   small in height, basically. Also fix a possible mem corruption.
	* hw/kdrive/ephyr/hostx.c:
	  (hostx_set_window_geometry): remove a useless XSync
2007-10-02 16:55:17 +02:00
Dodji Seketeli
7978272661 Xephyr: properly clip GL drawables in Xephyr 2007-10-02 16:55:17 +02:00
Dodji Seketeli
3816d64e50 Xephyr: oops, forgot to add ephyrdriext.h 2007-10-02 16:55:17 +02:00
Dodji Seketeli
cf58781eee Xephyr: make accelerated glxgears work in Xephyr
* hw/kdrive/ephyr/ephyr.c:
	 (ephyrInitialize): cleanup ephyrDRI extension init.
	 remove functions that belongs in ephyrdriext.c .
	* hw/kdrive/ephyr/ephyrdri.c:
	 (ephyrDRICreateDrawable): create the drawable on the host X peer
	  window, not on the host xephyr main window.
	 (ephyrDRIGetDrawableInfo): get drawable info of the host X peer
	  window.
	* hw/kdrive/ephyr/ephyrdriext.c: make ephyr DRI extention wrap
	  a bunch of screen ops so that it can update the host X peer
	  window whenever DRI bound drawable are moved in Xephyr.
	  Also code the building blocks of the management of the
	  host X window peer.
	* hw/kdrive/ephyr/hostx.c,h:
	  (hostx_create_window): added this new entry point
	  (hostx_destroy_window): ditto
	  ()hostx_set_window_geometry): ditto
2007-10-02 16:55:16 +02:00
Dodji Seketeli
6d1e44d3d5 Xephyr: fix a host X hang.
* hw/kdrive/ephyr/ephyrdri.c:
	  (ephyrDRIGetDrawableInfo): quickly hook
	  this into getting the drawable info from the host
	  X server. For the time being, this only gets the drawable info
	  of the Xephyr main window in the host. It should really get
	  the info of a the peer drawable in the host X. So there should be a
	  peer drawable to begin with.
	* hw/kdrive/ephyr/ephyrdriext.c:
	  (ProcXF86DRIGetDrawableInfo): some cleanups. Properly get the
          the drawable info otherwise there is a host X hang.
	* hw/kdrive/ephyr/ephyrhostglx.c: do not
	  (ephyrHostGLXQueryVersion): do not use C bindings of the glx protocol
	   calls. Some of those actually access DRI context directly, resulting
	   in the context having three clients. Instead all XF86DRI proto
	   fowarding request should be coded by hand and only forward the
	   protocol requests
2007-10-02 16:55:16 +02:00
Dodji Seketeli
a39b57d2f7 Xephyr: add more logging to GLX forwarding
* hw/kdrive/ephyr/ephyrhostglx.c: added more logging.
2007-10-02 16:55:16 +02:00
Dodji Seketeli
9e192d2118 Xephyr: better error handling in GLX forwarding
* hw/kdrive/ephyr/ephyrglxext.c:
	  fixed various logging functions
	  (ephyrGLXGetStringReal): make sure all the string is sent to clients
	  including the ending zero.
	* hw/kdrive/ephyr/ephyrhostglx.c:
	  (ephyrHostGLXGetStringFromServer): better error handling.
	  (ephyrHostGLXSendClientInfo): ditto.
	  (ephyrHostGLXMakeCurrent): ditto
2007-10-02 16:55:16 +02:00
Dodji Seketeli
4dd4be99df Xephyr: Make glxinfo work on the ATI R200 free driver.
* hw/kdrive/ephyr/ephyr.c:
	  (EphyrDuplicateVisual): when duplicating the
	  visual, copy the color component masks and the class
	  from the hostX
	  (EphyrMirrorHostVisuals): don't mix blue and green mask.
	* hw/kdrive/ephyr/ephyrdri.c: add more logs.
	  (ephyrDRICreateDrawable): actually implement this.
	  for the moment it creates a DRI drawable for the hostX window,
	  no matter what drawable this call was issued for.
	  (ephyrDRIGetDrawableInfo): actually implemented this.
	  for the moment the drawable info queried for its attrs is the
	  Xephyr main main window.
	* hw/kdrive/ephyr/ephyrdriext.c:
	  (ProcXF86DRIGetDrawableInfo): properly hook this dispatch
	  function to the ephyrDRIGetDrawableInfo() function.
	* hw/kdrive/ephyr/ephyrglxext.c: add a bunch of GLX implementation hooks
	  here. Hijack some of the xserver GLX hooks with them. Still need to
	  properly support byteswapped clients though.
	* hw/kdrive/ephyr/ephyrhostglx.c,h: actually implemented the protocol
	  level forwarding functions used by the GLX entr points in
	  ephyrglxext.c. Here as well, there are a bunch of them, but we are
	  far from having implemented all the GLX calls.
	* hw/kdrive/ephyr/hostx.c,h:
	  (hostx_get_window_attributes): added this new entry point
	  (hostx_allocate_resource_id_peer): added this to keep track of
	   resource IDs peers: one member of the peer is in Xephyr, the other
	   is in host X.
	  (hostx_get_resource_id_peer): ditto.
2007-10-02 16:55:16 +02:00
Dodji Seketeli
024abe825c Xephyr: add logging in the DRI extension 2007-10-02 16:55:15 +02:00
Dodji Seketeli
1dd589410c mirror the visuals of the host X at startup.
* hw/kdrive/ephyr/ephyr.c: make Xephyr mirror
	  the visuals of the host X upon startup. This
	  is important for GLX client apps.
	* hw/kdrive/ephyr/hostx.c,h: add a hostx_get_visuals_info()
	  to get the visuals of the host X.
2007-10-02 16:55:15 +02:00
Dodji Seketeli
26da625055 proxy the glXGetFBConfigSGIX call
* hw/kdrive/ephyr/ephyrglxext.c:
	  (ephyrGLXGetFBConfigsSGIX): proxy the GLXGetFBConfigsSGIX call.
	  It is a vendor extension to get the visual configs as a list of
	  name/value pairs.
	  (ephyrHijackGLXExtension): hijack the VendorPriv_dispatch_info
	  dispatch table to register our implementation of GLXGetFBConfigsSGIX
	  (ephyrGLXGetFBConfigsSGIXReal): added this where the real
	   implementation of GLXGetFBConfigsSGIX is. It support bytes swapping.
	  (ephyrGLXGetFBConfigsSGIX,ephyrGLXGetFBConfigsSGIXSwap): these are
	  the dispatch entry points. They just call
	  ephyrGLXGetFBConfigsSGIXReal.
	* hw/kdrive/ephyr/ephyrhostglx.c,h: reorganize the proxies to get
	  visual params from the host so that they clearly support the different
	  methods of doing so.
2007-10-02 16:55:15 +02:00
Dodji Seketeli
5af73f98c4 EPHYR: Add an experiment proto proxy extension.
* hw/kdrive/ephyr/Makefile.am: add the proxy extension to
	  ephyr. The proxy extension is an experimental extension that
	  forwards protocol packets targeted at a given extension to the
	  host X.
	* hw/kdrive/ephyr/ephyr.c: init proxy ext.
	* hw/kdrive/ephyr/ephyrhostproxy.c,h: added this new file as part of the
	  proxy extension.
	* hw/kdrive/ephyr/ephyrproxyext.c,h: ditto
	* hw/kdrive/ephyr/hostx.c: add the hostx_get_get_extension_info() entry
	  point.
2007-10-02 16:55:15 +02:00
Dodji Seketeli
c06fa924b4 XEPHYR: more GLX/DRI proxying work.
* hw/kdrive/ephyr/XF86dri.c: re format this correctly.
	  Make function decls honour the Ansi-C standard.
	* hw/kdrive/ephyr/ephyr.c: protect glx/dri related
	  extension initialisation with the XEPHYR_DRI
	  macro. Initialize the GLX ext hijacking
	  at startup.
	* hw/kdrive/ephyr/ephyrdri.c: add more logging to ease debugging
	* hw/kdrive/ephyr/ephyrdriext.c: ditto. reformat.
	* hw/kdrive/ephyr/ephyrglxext.c,h: add this extension to
	  proxy GLX requests to the host X. started to proxy those nedded to
	  make glxinfo work with fglrx. Not yet finished.
	* hw/kdrive/ephyr/ephyrhostglx.c,h: put here the actual
	  Xlib code used to hit the host X server because Xlib stuff cannot be
	  mixed with xserver internal code, otherwise compilation erros due to
	  type clashes happen. So no Xlib type should be exported by the
	  entrypoints defined here.
2007-10-02 16:55:15 +02:00