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.
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