* 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.
* dix/events.c, include/dix.h:
(UpdateSpriteForScreen): added this to update the mouse sprite context
when we switch from a pScreen to another.
* mi/mipointer.c:
(miPointerWarpCursor): as we are switching to a new pScreen,
don't forget to update the mouse sprite context.
This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe
ader.
It allocates a 0 sized pixmap using fb and calls the driver routine to do
work of allocating the actual memory.
ModifyPixmapHeader is mainly required for hooking the screen pixmap which
isn't create by normal methods
Not sure what I was thinking when I wrote this... it would cause the box
coordinates to be off for exaCopyNtoNTwoDir or fallbacks.
Thanks to Tilman Sauerbeck for pointing out the problem on IRC and testing the
fix.
Matches linuxPci.c changes made in 8279444a54
Fixes compiler errors:
"ix86Pci.c", line 194: too many struct/union initializers
"ix86Pci.c", line 204: too many struct/union initializers
"ix86Pci.c", line 214: too many struct/union initializers
Even though they're defined to zero by the spec, we've seen an EDID block
where the (empty) ASCII strings were stuffed in a byte early, leading to the
descriptor being considered a detailed timing instead.
If the driver isn't compatible to the server, all bets are off anyway wrt
the contents of the fields that we're validating, which can lead to bogus
error messages.