Add $(AM_V_GEN) for sed-based rules so they appear as expected with
automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm
commands which are not prone to fail.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Add $(AM_V_at) to all relink make targets to silence them when automake
silent rules are in use.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
The problem fixed by this patch can be reproduced on Linux with the
following steps.
- Access NULL pointer intentionally in ProcessOtherEvent on key press.
- Instead of saving core dump to a file, write it into a pipe.
echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern
- Dump the core by pressing a key.
While the core is being dumped into the pipe, the smart schedule timer
will cause a pending SIGALRM. Linux kernel stops writing data to the
pipe when there are pending signals. This causes the core dump to be
truncated. On my system I'm expecting a 6 MB dump but the size will be
60 kB instead. The problem is solved if we block the SIGALRM caused by
expired smart schedule timer.
I haven't been able to reproduce this problem in the following cases.
- Save core dump to a file instead of a pipe.
- kill -SEGV `pidof Xorg`
- Press a key to dump core while gdb is attached to Xorg.
- Give option -dumbSched to Xorg.
Also note that the fix works only when NoTrapSignals has the default
value FALSE. The problem can still be reproduced if error signals
aren't trapped. In addition to pending SIGALRM, there is a similar
problem with pending SIGIO from the keyboard driver during core dump.
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
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>
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>
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>
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>
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>
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>
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>
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>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
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>
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>
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>
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>
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>
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>
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>
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>
Input events are directed to both vt and input devices by default.
Unless input devices are grabbed, keyboard events fill it vt buffers
and cause spontaneous wakeups in kernel tty layer when buffers are full.
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>
From the original Xsdl commit:
"sdl x server so that we can x-on-x the fb stuff for ease of debugging. if
anyone uses this in production, a big scary monster will eat them.
hrm, perhaps i should make it have a --i-know-what-i'm-doing
param that it doens't start without, heh"
That should be reason enough to not spend time maintaing it. Also, no more
elephants.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Drop the dmx-specific defines, there's no reason to have separate ones
considering they're about as hardcoded as the default rules anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
XWin uses ddxBeforeReset, which is called in DIX. Other DDXs need to
define these in order to avoid an undefined symbol error at link time
when building alongside XWin. Xnest and Xvfb already provide empty stubs;
this does the same for Xdmx and the platform-neutral KDrive servers.
Also add a prototype to avoid a warning in all DDXs.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
KDRIVE_LIBS already contains the libs in XSERVER_LIBS, so linking against
both leads to multiple-definition errors when linking on Cygwin.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
When testing if an fd is valid, the required construct is >= 0, not > 0.
[Daniel: Fixed up the Linux MTRR case as well.]
Signed-off-by: Martin Ettl <ettl.martin@gmx.de>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
If -parent is given, don't open up a new window if -screen is given as well.
The commandline option -screen allows to set the depth of the embedded
Xephry instance, even though width and height are autoscaled on -parent.
This patch checks for a -screen parameter after -parent and - if one is
found - delays initializing the screen. The parent window id is stored
temporarily but re-set after a -screen argument.
The following command is thus valid:
Xephyr -parent 1234 -screen 640x480@8 -screen 1024x768
It embeds the first 8-bit screen into window 1234 and opens up a new window
for the second screen. Multiple parent arguments are possible, the screens
are embedded in-order.
X.Org Bug 24144 <http://bugs.freedesktop.org/show_bug.cgi?id=24144>
Tested-by: Vic Lee
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xkbRules, xkbModel and xkbLayout are strdup'd in KdNewKeyboard, need to be
freed.
The ephyr driver strdups the name on top of the already allocated
kdrive-assigned name. Memory must be freed beforehand.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Clears warnings about obsolete headers, but raises minimum
required version of xf86driproto to 2.1.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
kdrive ignores all devices from hal as they don't have the 'type' option
set. Instead of "Unrecognised device identifier!" print out "Ignoring
device from HAL." to indicate that the errors surrounding the device don't
really matter.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
InternalEvents shouldn't be used anywhere outside the X server itself. Split
up into events.h for opaque typedefs for the events needed by various
headers and eventstr.h for the actual struct definitions.
eventstr.h must only be included by code that requires internal events and
is not part of the SDK.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
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>
<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.
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>
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.
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.
<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).
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.
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
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.
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.
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.
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>
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.
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.
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.
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.
* 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.
* 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.
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.
* 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.
* 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.
* 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
* 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
* 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
* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* hw/kdrive/ephyr/ephyrhostvideo.c/h:
(ephyrHostXVStopVideo): add this entry point.
* hw/kdrive/ephyr/ephyrvideo.c:
Basically add ReputImage and StopVideo implementations.
Now, when other windows obscur the video window, the reclipping
seems to be well handled using StopVideo and ReputImage.
To do this, I was obliged to save the frame in PutImage, so
that I could resend it un ReputImage.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivQueryHostAdaptors): properly set
port private luke. This fixes a crash when
the host Xv supports multiple ports.
Make sure number of ports cannot be zero.
* configure.ac,include/dix-config.h.in: define the XEPHYR_DRI macro.
define it when --enable-xephyr and --enable-dri are both turned on.
* hw/kdrive/ephyr/XF86dri.c: copy this from mesa source to enable
Xephyr to talk DRI protocol the host X. In mesa, this is used by libGL.so to
talk DRI protocol with the server.
* hw/kdrive/ephyr/ephyr.c: finally initialise the DRI extension
in the ephyrInitScreen() function.
* hw/kdrive/ephyr/ephyrdri.c,ephyrdriext.c: safeguard the compilation
using the XEPHYR_DRI macro.
* hw/kdrive/ephyr/ephyrdriext.c: added this to implement a DRI extension
into Xephyr. Normally the DRI extension is only present in the
xfree86 server, but I have ported it to Xephyr. The extension calls
functions that declared/defined in ephyrdri.h ephyrdri.c that
forwards the DRI calls to the host X. It does not work yet, as this
entry is just to put the big bricks in place.
* hw/kdrive/ephyr/ephyrdri.c,h: declaration & definition of the
DRI client API that would hit the hostX server.
* hw/kdrive/ephyr/GL/internal/dri_interface.h: added this, otherwise
inclusion of /usr/include/X11/dri/xf86dri.h won't compile
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVPutImage): make this support clipping region.
The clipping region is propagated to host using XSetClipRectangles.
This changes the API of ephyrHostXVPutImage.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrPutImage): propagate the clipping region to the new
ephyrHostXVPutImage() entry point.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrInitVideo) make the EphyrXVPriv object be a
singleton instance, otherwise a new object is created at each
generation.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVAdaptorHasPutVideo): detect if
host X has the PutVideo call.
(ephyrHostXVAdaptorHasPutStill): detect if
host X has the PutStill call
(ephyrHostXVAdaptorHasPutImage): detect if
host X has the PutImage call
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivQueryHostAdaptors): make sure to create
atoms for attribute names otherwise subsequent
calls to get/set attribute from clients won't work.
(ephyrXVPrivSetAdaptorsHooks): don't hardwire advertising
of the PutImage call. Instead, advertise the calls advertised
by the host.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVLogXErrorEvent): add this to
log X error events. Heavily copied from libx11
(ephyrHostXVErrorHandler): new x error handler that
logs the error but does not exits.
(ephyrHostXVInit): add this to be called at the beginning
of xvideo lifetime. It sets an xerror handler that does not
exit.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivIsAttrValueValid): this validates an attribute
value.
(ephyrSetPortAttribute): before setting an attribute,
validate the new value so that we don't send a buggy
request to host X.
* hw/kdrive/ephyr/*.c: fix case in ephyrvideo code.
* hw/kdrive/ephyr/ephyr.c: fix a typo
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(EphyrHostXVPutImage): first implementation. does not
support clipping regions yet.
* hw/kdrive/ephyr/ephyrvideo.c:
(DoSimpleClip): clip using a clipping box. Does not
support regions yet.
(EphyrPutImage): first implementation.
Uses a simple clipping rectangle, no region yet.
* hw/kdrive/ephyr/hostx.c:
(hostx_get_window): added this to get the main
window of the host x.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(EphyrHostXVQueryImageAttributes): add this call. It calls
XvQueryBestSize xserver entry point. It uses the protocol
level machinery because Xvlib does not expose that entry point
as a C function.
(EphyrHostXVQueryBestSize): added this wrapper around XvQueryBestSize().
(EphyrHostGetAtom, EphyrHostGetAtomName): added this to get
an atom or atom name from the host server
* hw/kdrive/ephyr/ephyrvideo.c:
(EphyrSetPortAttribute): convert the atom into an host server
server atom before attacking the host server with it, because in
in its current form, the input atom is only valid in xephyr.
This fix makes this call work.
(EphyrGetPortAttribute): ditto.
(EphyrQueryBestSize): implement this.
(EphyrQueryImageAttributes): implement this.
* hw/kdrive/ephyr/ephyrhostvideo.c:
(EphyrHostXVAdaptorGetVideoFormats): properly get visual class instead of
returning the visual id.
(EphyrHostXVQueryEncodings): properly copy the fields because simple casting does
truncate some fields.
(EphyrHostAttributesDelete): XFree the whole array instead of trying to free invidial members.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrInitVideo): fix a typo
(EphyrXVPrivQueryHostAdaptors): set XvWindowMask mask to adaptors type.
use host adaptor name. Don't forget to set nImages field.
(EphyrXVPrivRegisterAdaptors): report an error when KdXVScreenInit() fails.
* This patch adds multiscreen support to Xephyr. For instance,
the command line : "Xephyr :4 -ac -screen 320x240 -screen 640x480"
will launch with two "screens" - namely two main windows.
The first main window represents a screen that has the number :4.0, with
a geometry of 320x240 pixels, and the second one represents a screen
that has the number :4.1 with a geometry of 640x480.
The command line: "DISPLAY=:4.1 xclock" will launch the xclock program
on the second screen, for intance.
* this patch was edited by Dodji Seketeli <dodji@openedhand.com> for:
- better style compliance with the rest of the Xephyr code
- make sure Xephyr could be launched with no -screen option. By
default that creates a default screen of 640x480 pixel like before
- display full titles on the windows - with insctructions to grab
keyboard and mouse - like before.
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of
inputInfo.keyboard and inputInfo.pointer, respectively; all use cases
are non-XI compliant anyway.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive. This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it. No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
* configure.ac: re-sort Kdrive libs so that symbols get properly resolved.
Basically, all some libs are present in both $KDRIVE_LIBS and $XSERVER_LIBS,
and some libs orders are not correct. So I made sure Kdrive servers don't have
to link against $KDRIVE_LIBS *and* $XSERVER_LIBS. They just have to link
against $KDRIVE_LIBS now.
* hw/kdrive/*/Makefile.am: update those makefile to reflect the change in configure.ac
Licensing issues of these files include:
- They claim to be licensed under the GPL, yet we haven't allowed that in the
xserver repository in the past.
- They refer the user to the top of the tree for GPL license text, yet it isn't
there.
- They claim to be derived from the (MIT-licensed) ati kdrive code, yet don't
follow the licensing terms of those files.
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other. Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested. The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.
Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
I exported the evdev driver to Xephyr server. I'm running it using something
like:
$ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \
evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br
It also closes /#5668.