Commit Graph

44 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
Adam Jackson 03b2125005 dix: Remove LegalModifier()
This hasn't done anything besides return TRUE in a long long time.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:17 -04:00
Adam Jackson 4affa75a90 xnest: Fix needless build dependency on xcb-util-keysyms
This was added in:

    commit 4301479508
    Author: Olivier Fourdan <ofourdan@redhat.com>
    Date:   Mon Jan 5 16:44:22 2015 +0100

        Synchronize capslock in Xnest and Xephyr

Which is fine if you're building both, but if you don't happen to have
xcb-util-keysyms' headers installed Xnest will configure as enabled but
fail to build.

Fortunately <X11/X.h> has a corresponding #define, so use that instead.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-11-24 10:41:14 -05:00
Keith Packard 26e50e8b2c Merge remote-tracking branch 'jturney/mingw-build-fixes' 2015-05-11 15:36:53 -07:00
Jon TURNEY 2b114d6a51 hw/xnest: Fix build for MinGW
Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid
type clashes caused by the unwrapped windows.h that includes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-04-22 12:55:27 +01:00
Alan Coopersmith ae2dc01cf1 Convert hw/xnest & hw/vfb to new *allocarray functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:58:08 -07:00
Olivier Fourdan 4301479508 Synchronize capslock in Xnest and Xephyr
In Xnest or Xephyr, pressing CapsLock when focus is on another
window does not update the state in the nested X server.

This is because when synchronizing the lock modifier, sending a
keypress or a key release only is not sufficient to toggle the state,
unlike regular modifiers, one has to emulate a full press/release
to lock or unlock the modifier.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-07 09:22:12 +10:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08: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
Jeremy Huddleston 83fef4235d Xnest: Match the host's keymap
This was a regression.

Introduced by: 08363c5830 and
               32db27a7f8
Masked by: 1e69fd4a60

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21 10:29:51 -07:00
Peter Hutterer fd4f5059f0 dix: purge leftover manual key down bit setting.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-07 13:29:46 +10:00
Mikhail Gusarov 3f3ff971ec Replace X-allocation functions with their C89 counterparts
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>
2010-05-13 00:22:37 +07:00
Peter Hutterer 5904ef2ccd xnest: restore xnestUpdateModifierState
The meat of xnestUpdateModifierState was ifdef'd out in
6ef46c40e6. This resulted in stuck modifiers
when a modifier key release event wasn't sent to Xnest (e.g. Alt-Tab away).

See X.Org Bug 3664 <https://bugs.freedesktop.org/show_bug.cgi?id=3664> for
the original bug report.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05 10:45:20 +10:00
Peter Hutterer 1e69fd4a60 xnest: fix up parameters to InitKeyboardDeviceStruct.
IKDS takes a DeviceIntPtr as first argument, and an RMVLO struct as second.
The keysyms stuff is long gone now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03 12:04:11 +10:00
Peter Hutterer b406886bbf input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct.
Virtually all callers use
    XkbGetRulesDefault(&rmlvo);
    InitKeyboardDeviceStruct(..., rmlvo);

Let's save them the trouble and accept NULL as a hint to take the
default RMLVO.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-04-17 10:03:40 +10:00
Peter Hutterer bef1cfb239 xnest: remove unused variable 'names'.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-14 17:13:34 +10:00
Paulo Cesar Pereira de Andrade 6ef46c40e6 Update xnest keyboard code to match xephyr/kdrive.
Xnest was not updated in the last batch of xkb changes. This
patch is basically cut&paste from hw/kdrive/src/kinput.c and
hw/kdrive/ephyr/ephyr.c, and appears to generate a Xnest as
functional as before the xkb changes.
2009-01-25 19:01:10 -02:00
Daniel Stone 32db27a7f8 Input: Remove modifierMap from core
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>
2009-01-22 15:08:55 +11:00
Daniel Stone 40877c6680 XKB: Make XKB mandatory
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>
2009-01-22 15:06:25 +11:00
Alan Coopersmith 3208eff2d7 Update xorg-server.h.in & Xnest to use new XKB default #defines 2009-01-21 14:45:06 -08:00
Benjamin Close 4f004ab9a8 XNest: Fix the build caused by __XKBDEFRULES__ -> XKB_DFLT_RULES in 23862ede59 2009-01-22 01:36:31 +10:30
Peter Hutterer cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
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>
2008-12-12 11:43:32 +10:00
Peter Hutterer 6bb0e0a536 xnest: I'm sure xfree works fine, even if we're 64 bit.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:01:42 +10:30
Adam Jackson 021fc5cb2c Static markup and dead code cull over xkb/.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header.  Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
2007-03-20 18:37:02 -04:00
Daniel Stone 81728558a0 input: add non-keyboard bell ringing function
Add a generic 'ring the bell' function (console bell on Linux and BSD,
/dev/audio on Solaris), and add DDX functions for this.  Make this the
core keyboard's bell.
Port Xvfb and Xnest to this.
Port XFree86 to this, with OS-specific hooks for Linux, BSD, and Solaris
taken from foo_io.c in the old layer.
2006-11-01 23:10:26 +02:00
Daniel Stone ad631afcf3 make core keyboard/pointer map functions act on all core-sending devices
Make Set{Keyboard,Modifier,Pointer}Mapping act on all devices which send core
events.
Change LegalModifier to accept a DeviceIntPtr.
2006-09-29 00:34:23 +03:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Greg Kroah-Hartman 6119845d1f fix compiler warnings in hw/xnest/Keyboard.c 2006-06-09 10:14:08 -07:00
Daniel Stone fd8bde8bb0 Remove -xkbmap argument. 2006-05-29 11:14:03 +00:00
Daniel Stone 9e202dfe40 Remove remnants of XkbCF code. 2006-03-27 22:25:56 +00:00
Kevin E Martin 6b546d0ec0 Add #include <xnest-config.h> to the Xnest source files for modularization. 2005-07-14 03:36:44 +00:00
Daniel Stone 0bb669638f Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". 2005-07-03 08:53:54 +00:00
Adam Jackson e6602b041f Bug #3546: Use MAP_LENGTH instead of a magic number. (Mark McLoughlin) Bug
#3664: Further fixes to Xnest modifier state handling. (Mark
    McLoughlin)
2005-07-02 17:02:23 +00:00
Daniel Stone 9b1debcdb6 Change all misc.h and os.h references to <X11/foo.h>. 2005-07-01 22:43:43 +00:00
Adam Jackson aa7fb99bc7 Bug #3030: Fix Xnest keyboard state handling. (Mark McLoughlin) 2005-06-25 21:28:48 +00:00
Daniel Stone 292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00
Egbert Eich 2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich 867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich 147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley d568221710 XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
Kaleb Keithley ded6147bfb R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00