The indenter seems to have gotten confused by initializing arrays of
structs with the struct defined inline - for predefined structs it did
a better job, so match that.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Bugzilla: https://bugs.freedesktop.org/25804
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
No-one ever did anything with this variable except assign its default
value to it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:
-bap
-psl
-T PrivatePtr
-T pmWait
-T _XFUNCPROTOBEGIN
-T _XFUNCPROTOEND
-T _X_EXPORT
The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.
The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.
The comparison was done with this script:
dir1=$1
dir2=$2
for dir in $dir1 $dir2; do
(cd $dir && find . -name '*.o' | while read file; do
dir=`dirname $file`
base=`basename $file .o`
dump=$dir/$base.dump
objdump -d $file > $dump
done)
done
find $dir1 -name '*.dump' | while read dump; do
otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
diff -u $dump $otherdump
done
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Report to find out all non-UTF-8 files created by
cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do
if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then
/bin/true
else
echo $FILE
fi
done >>report
Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
[Daniel: git am failed for me, so I redid it. The method listed in the
commit message also failed, so I just used file/grep/iconv. The
results are the same though.]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In the Xephyr case the position of the pointer relative toward the
Xephyr window is controlled by the host server without taking into
account rotation of the Xephyr screen. Consequently the pointer coords
must always be translated when the fb is rotated.
Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* See https://bugs.freedesktop.org/show_bug.cgi?id=3030
Signed-off-by: Xiaoyang Yu (Max) <max.a.yu@intel.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This takes the xnest way of working around this (see
5904ef2ccd "xnest: restore
xnestUpdateModifierState") and copies it to Xephyr.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.
The mechanical changes were performed by running the included
'fix-region' script over the whole tree:
$ git ls-files | grep -v '^fix-' | xargs ./fix-region
And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.
$ sh ./fix-patch-whitespace
Thanks to Jamey Sharp for the mighty fine sed-generating sed script.
The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.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>
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>
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>
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>
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>
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
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.
* 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/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/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/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.