Commit Graph

75 Commits

Author SHA1 Message Date
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Alan Coopersmith 4ad21c3247 Add ddxInputThread call from os layer into ddx layer
Allows ddx's to run additional code as necessary to set up the
input thread.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-25 15:48:03 +00:00
Adam Jackson 67c303fff3 miinitext: Load GLX on the mi path
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:48 -05:00
Adam Jackson 0848390d51 xephyr: Fix regeneration
I had said:

    commit c42311a9d7
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Fri Mar 24 15:58:54 2017 -0400

        kdrive: Remove KdOsFuncs

        Only the Init slot was used, and Xephyr can just as easily do
        that initialization directly.

And I'd've been right, but I forgot to make that initialization only
happen on startup (i.e. when serverGeneration == 1).

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-11 14:13:12 -04:00
Adam Jackson b7376fb933 kdrive: Remove dead slots from KdCardFuncs
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-03 16:01:25 -04:00
Adam Jackson c42311a9d7 kdrive: Remove KdOsFuncs
Only the Init slot was used, and Xephyr can just as easily do that
initialization directly.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-03 16:00:54 -04:00
Eric Anholt 190c2adf4a kdrive: Drop kdrive-config.h.
It had nothing left in it that was used but wasn't in dix-config.h.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23 13:17:36 -04:00
Eric Anholt 1b1a8c4817 kdrive: Unifdef KDRIVE_EVDEV.
ajax deleted the evdev driver in the removal of fbdev and the linux
backend.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23 13:14:13 -04:00
Eric Anholt add4979260 ephyr: Add a mode for skipping redisplay in glamor
This speeds up headless testing of Xephyr -glamor with softpipe from
"a test per minute or so" to "a test every few seconds".

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28 12:43:41 -04:00
Laércio de Sousa 851ff9ec04 ephyr: enable option -sw-cursor by default in multi-seat mode
Option -seat passed to Xephyr requires -sw-cursor to be passed as well,
otherwise the mouse cursor will remain invisible for the given seat.
This patch takes care of enabling -sw-cursor if -seat is passed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-03-01 10:46:43 -05:00
Laércio de Sousa da69f2f15a ephyr: don't load ephyr input driver if -seat option is passed
When used for single-GPU multi-seat purposes, there's no need to enable
ephyr virtual input devices, since Xephyr is supposed to handle its own
hardware devices.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Laércio de Sousa 7213e99cbc ephyr: ignore Xorg multiseat command line options
Multi-seat-capable display managers commonly pass command-line options
like "-novtswitch", "-sharevts", or "-layout seatXXXX" to Xorg server,
but Xephyr currently refuses to start if these options are passed to it,
which may break Xephyr-based single-GPU multiseat setups.

[ajax: shortened summary]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Adam Jackson 623ff251dd xephyr: Remove DRI1
This only worked if the backend server supported DRI1, which is
stunningly unlikely these days.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-28 09:01:12 -05:00
Jürg Billeter 9414ba3683 ephyr: fix -no-host-grab argument processing
Signed-off-by: Jürg Billeter <j@bitron.ch>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-21 12:08:25 -04:00
Egbert Eich 5af73f4908 Xephyr: Don't crash when no command line argument is specified
The DDX specific command line parsing function only gets called
if command line arguments are present. Therefore this function
is not suitable to initialize mandatory global variables.
Replace main() instead.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:49:49 -07:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
William ML Leslie 942e18e17e Xephyr: option to disable grabbing the host
This patch makes it possible to use C-S key combinations
within Xephyr without losing access to the host window manager's
commands.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-10-22 14:16:16 -07:00
Adam Jackson 670ee0757f ephyr: Properly implement hardware cursors (v3)
When dix hands us a new cursor we proxy it through to the host server;
since we keep the host XID on the cursor bits private we can switch
among them with just ChangeWindowAttributes.

v2:
Use xcb-renderutil for argb format lookup (Uli, Keith)
Fall back to core cursors for host RENDER < 0.5 (Keith)
Drop useless ephyrEnableCursor
Consistently create/destroy the cursor image GC on both paths
Treat null cursor from dix as invisible

v3:
Initialize the invisible cursor's image (Keith)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:27:10 -07:00
Laércio de Sousa 3a51418b2d ephyr: set screen size & origin from host X server output's CRTC geometry
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake "Zaphod mode").

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Laércio de Sousa 84b02469ef ephyr: enable screen window placement following kdrive -screen option extended syntax
With this patch, one can launch Xephyr with option "-screen WxH+X+Y"
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Eric Anholt 6d49548849 Merge remote-tracking branch 'origin/master' into glamor-next
I've done this merge manually to resolve the minor conflict in glamor.c.

Signed-off-by: Eric Anholt <eric@anholt.net>
2014-07-17 18:07:26 -07:00
Keith Packard bfa5c73a36 ephyr: Free damage structure at server reset time
The usual mechanism for freeing a damage structure when the pixmap is
destroyed does not work for the screen pixmap as it isn't freed in the
normal way.

The existing driver cleanup function, scrfini, is called after the
wrapped CloseScreen functions, including damageCloseScreen, are called
and thus ephyr can't free the damage structure at that point.

Deal with this by providing an early CloseScreen hook in KdCloseScreen
which ephyr can use to free the damage structure before damage itself
shuts down.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-07-17 11:26:44 -07:00
Eric Anholt 199d9a6a94 xephyr: Allow initializing glamor with gles2 (on GLX).
This should be useful for glamor development, so you can test both
paths (which are significantly different, and apparently
glamor_gradient.c was broken on GLES2 as of the import).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-16 05:43:43 +01:00
Emil Velikov e46820fb89 miinitext: introduce LoadExtensionList() to replace over LoadExtension()
Looping around LoadExtension() meant that ExtensionModuleList was reallocated
on every extension. Using LoadExtensionList() we pass an array thus the
function can do the reallocation in one go, and then loop and setup the
ExtensionModuleList.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>

v2: Update ephyr [Keith Packard]
v3: Eliminate const warnings in LoadExtensionList [Keith Packard]

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-25 16:00:17 -07:00
Eric Anholt 9fe052d90c xephyr: Build support for rendering with glamor using a -glamor option.
v2: Avoid making the Ximage for the screen that we'll never use, and
    drive the screen pixmap creation for glamor ourselves.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05 13:10:12 -08:00
Keith Packard aa47a44096 kdrive/ephyr: ddxUseMsg is supposed to return
I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but
it's not declared to exit.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:51 -08:00
Keith Packard f2d149b6d1 kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls
These were duplicated when GLX support was re-added on two different branches.

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 16:43:41 -07:00
Keith Packard f3b529bf25 Merge remote-tracking branch 'anholt/ephyr-fixes' 2013-10-04 14:04:48 -07:00
Laurent Carlier ceffb34774 ephyr: restore GLX support
It was removed since version 1.13

Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2013-09-10 13:26:25 -04:00
Sebastien Bacher abc2bfca16 kdrive: initialize GLX for xephyr
Like commit ac1a60e7b6, re-add
initialization of GLX after it was accidentally dropped from non-Xorg
servers in 5f5bbbe543.

Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 14:35:39 -07:00
Eric Anholt ba387cf21f ephyr: Use host (HW) cursors by default.
Unless you're working on the sw cursor rendering code, you surely want
to have real hardware cursors.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:38 -07:00
Eric Anholt 847c856eff ephyr: Move the host screen info into the kdrive screen private.
We can include xcb bits from the same place as server headers, so
there's no need to hide them any more.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:48 -07:00
Eric Anholt 77c7a2014e kdrive: Fix const cast warnings in arguments processing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:46 -07:00
Daniel Martin 3aac7a59dc ephyr: Add -resizeable option
With this option passed, ephyr windows can be resized like normal
windows on the fly, without the need of an explicit parent window.

Signed-off-by: Daniel Martin <daniel.martin@secunet.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-18 16:26:15 +10:00
Daniel Stone fadfc29470 GLX: Remove unused noGlxVisualInit
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>
2012-07-10 00:42:09 -07:00
Keith Packard 9838b7032e Introduce a consistent coding style
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>
2012-03-21 13:54:42 -07:00
Peter Hutterer 87d4f90bfc input: free the EQ allocated memory on shutdown (#38634)
mieqFini() already does the right thing, but it needs to be called by the
various DDXs and the XTest Extension.

X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-01 08:46:28 +10:00
Matěj Cepl b27d61e443 Fix UTF-8 encoding
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>
2011-06-30 16:38:31 +10:00
Tomas Frydrych b387069faf Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing
The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be
NULL it seems.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-25 08:23:58 +10:00
Peter Hutterer d33adcdf03 dix: move config_init into the DDX.
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>
2010-02-15 09:15:18 +10:00
Mikhail Gusarov 62883b499b kdrive: Remove unused KdCardAttr from KdCardInfo
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>
2010-01-06 19:47:53 +06:00
Mikhail Gusarov 6c2b3a4247 kdrive: Add option to compile out input drivers
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>
2010-01-06 19:47:53 +06:00
Yaakov Selkowitz 9bc4e88d84 Define ddxBeforeReset stubs in platform-neutral DDXs
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>
2009-10-15 08:06:53 -07:00
Peter Hutterer 19be992d9d ephyr: if -parent is given, check for a trailing -screen. (#24144)
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>
2009-09-29 09:38:44 +10:00
Adam Jackson e3c65cf1df xephyr: Add -title option. 2009-06-10 12:05:09 -04:00
Adam Jackson 759348f13f Xephyr: Add some rudimentary Xnest command line compat 2009-01-22 22:11:15 -05:00
Peter Hutterer 585125685b ephyr: some whitespace changes. 2008-06-08 23:28:27 +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 942086fc96 dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it 2008-05-31 18:17:49 +09:30
Peter Hutterer fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30