Alan Coopersmith
d960db8fd9
Strip trailing whitespace from source files
...
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`
`git diff -w` & `git diff -b` show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/8 >
2025-08-20 16:23:58 -07:00
Alan Coopersmith
03dab66493
NestedClientCreateScreen: avoid leaks on failure paths
...
Found by Oracle Parfait 13.3 static analyzer:
Memory leak [memory-leak]:
Memory leak of pointer pPriv allocated with malloc(168)
at line 182 of xlibclient.c in function 'NestedClientCreateScreen'.
pPriv allocated at line 177 with malloc(168)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/7 >
2024-10-26 09:50:58 -07:00
Enrico Weigelt, metux IT consult
86b6dc3bb6
drop some dead code
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/5 >
2024-05-19 17:58:21 +00:00
Enrico Weigelt, metux IT consult
a2b108a8bd
drop ancient compat hacks
...
We rely on minium xserver version 1.18
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/5 >
2024-05-19 17:58:21 +00:00
Alan Coopersmith
82331693c4
Raise minimum supported Xserver version to 1.18 (ABI_XINPUT_VERSION 22.1)
...
Already effectively required by use of XNFcallocarray() introduced in
xorg/xserver@b96dc999 - xserver-1.18.0, released in Nov. 2015.
Allows dropping remnants of code for XAA and pre-pciaccess X servers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/6 >
2024-05-14 17:44:42 -07:00
Enrico Weigelt, metux IT consult
525e7c3eb2
use XNFcallocarray() instead of xnfcalloc macro
...
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nested/-/merge_requests/4 >
2024-05-08 16:17:48 +02:00
Alan Coopersmith
ebf3e47c68
Quiet 3 -Wdeclaration-after-statement warnings
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
2024-01-08 13:54:12 -08:00
Alan Coopersmith
c13fd78b53
Add X.Org's standard C warning flags to AM_CFLAGS
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
2024-01-08 13:50:46 -08:00
Jon Turney
6a48b385c4
Update for removal of virtualFrom from ScrnInfoRec
...
Removed in xserver commit 76ef102b.
2018-12-14 17:30:04 +00:00
Keith Packard
1d02fa6da7
Handle ABI version 23
...
Block and wakeup handlers have changed function signature.
Signed-off-by: Keith Packard <keithp@keithp.com >
2016-07-19 09:06:04 -07:00
Keith Packard
4512072ccd
Fix const and deprecated func warnings
...
A few const char warnings, plus XNFcalloc is now deprecated
Signed-off-by: Keith Packard <keithp@keithp.com >
2016-07-19 09:04:03 -07:00
Jeremy Huddleston Sequoia
44ba273ca0
xlibclient.c: Fix build failure due to including server headers without first including xorg-server.h
...
eg:
.../include/xorg/os.h:572:1: error: expected parameter declarator [Parse Issue]
strlcpy(char *dst, const char *src, size_t siz);
^
/usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
^
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
2013-12-17 15:31:33 -08:00
Alan Coopersmith
72355a2b55
Replace sprintf call with snprintf
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
2013-10-19 21:57:49 -07:00
Jon TURNEY
b969683854
Remove miInitializeBackingStore()
...
This doesn't exist any more, and apparently hasn't done anything since xserver 1.4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk >
Reviewed-by: Aaron Plattner <aplattner@nvidia.com >
2012-12-21 12:01:19 +00:00
Daniel Martin
ad48dc6eb9
Fix return check of XShmQueryExtension
...
XShmQueryExtension returns true if it is supported. Due to a missing "!"
within the if clause the assumption was that there is no MIT-SHM even if
it was.
Regression-from: 26f6ab7cbc
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com >
Signed-off-by: Daniel Martin <daniel.martin@secunet.com >
2012-06-15 00:31:42 -07:00
Dave Airlie
a438098e6f
nested: port to new compat API.
...
This ports nested to the new server compat API.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2012-06-05 11:46:57 +01:00
Yaakov Selkowitz
85f10de940
Add XORG_LIBS to LIBADD
...
This affects only Cygwin, where drivers must be linked against the
Xorg implib. On other systems, XORG_LIBS will be empty.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net >
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com >
2012-04-05 21:54:06 -05:00
Jeremy Huddleston
ea72bf8742
Fix make distcheck
...
Rename input to nested_input to avoid conflict with xorg/input.h and
actually include it in the dist tarball.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2012-03-08 01:33:36 -08:00
Jeremy Huddleston
83e1aec8cf
Silence a -Wincompatible-pointer-types because we know better.
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2012-03-08 01:19:53 -08:00
Jamey Sharp
7b93f056dc
Update for input API change: InputOption is an opaque type now.
...
I copied the backwards-compatibility functions from xf86-input-joystick.
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-11-20 03:49:13 -08:00
Jeremy Huddleston
eed1f2a15b
Set the keyboard mapping based on the remote server's map
...
This works for 32bit servers, but there are still issues with 64bit servers.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-10-16 06:16:04 -07:00
Jeremy Huddleston
0bebed0452
Properly include config.h in each of our source files
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-10-16 06:05:02 -07:00
Jamey Sharp
ee0f8d95c1
Fix copy/paste error in log messages emitted during early (racey) input.
...
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-09-19 20:34:49 -07:00
Jeremy Huddleston
2bf78c42dd
Drop input events until our device is initialized
...
The use of TimerSet() to initialize input is racey, this avoids a crash if
initialization looses the race. This is a good workaround for now, but
we should look into a better way to initialize when we get a chance later.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:32:15 -07:00
Jeremy Huddleston
311488bc0a
Cleanup NestedClientCheckEvents to use switch rather than if-else-foo
...
This makes the code more readable and makes the following patch cleaner.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:32:02 -07:00
Jeremy Huddleston
7e909e6df0
If we fail to NewInputDeviceRequest, FatalError rather than crash later.
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:27:35 -07:00
Jeremy Huddleston
36a568738f
Don't ignore errors in NestedInputControl
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:27:35 -07:00
Jeremy Huddleston
0071e4b659
Finish stubbing out various functions that need a returned value
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:27:33 -07:00
Jeremy Huddleston
ac7caecc09
Dead code removal: NestedShadowWindow
...
driver.c:669:14: warning: unused function 'NestedShadowWindow'
[-Wunused-function]
static void *NestedShadowWindow(ScreenPtr pScreen, CARD32 row, CARD32 offset,
^
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:26:59 -07:00
Jeremy Huddleston
4568d05dd6
NestedCreateScreenResources needs to return a value
...
This Fixes error detection in NestedCreateScreenResources.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-19 19:23:54 -07:00
Jeremy Huddleston
72ac057041
Avoid an erroneous free on shutdown
...
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jamey Sharp <jamey@minilop.net >
2011-09-15 01:20:52 -05:00
Jeremy Huddleston
26f6ab7cbc
Improve support for servers that do not support MIT-SHM
...
If MIT-SHM fails, we should still try to initialize without it.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jamey Sharp <jamey@minilop.net >
2011-09-15 01:17:46 -05:00
Jamey Sharp
7dcb24f316
Quit waking up every 20ms to get events from the backend server.
...
Instead, let the input core monitor the X socket, and also register a
block handler to catch any events that were already read before the
server's main-loop goes to sleep.
Signed-off-by: Jamey Sharp <jamey@minilop.net >
Tested-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-15 01:15:06 -05:00
Jeremy Huddleston
d02b5449d1
Dead code removal
...
Remove some #if 0 code.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 18:37:08 -05:00
Jeremy Huddleston
27425f2efe
Remove some unused variables
...
driver.c:553:9: warning: unused variable 'rc' [-Wunused-variable]
int rc;
^
input.c:188:18: warning: unused variable 'pInfo' [-Wunused-variable]
InputInfoPtr pInfo = device->public.devicePrivate;
^
input.c:210:26: warning: unused variable 'pNestedInput' [-Wunused-variable]
NestedInputDevicePtr pNestedInput = pInfo->private;
^
2 warnings generated.
xlibclient.c:272:11: warning: unused variable 'msg' [-Wunused-variable]
char *msg = "Cursor";
^
xlibclient.c:273:11: warning: unused variable 'msg2' [-Wunused-variable]
char *msg2 = "Root";
^
2 warnings generated.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 18:37:04 -05:00
Jeremy Huddleston
df9f1cb174
Change the window title to be the Screen index
...
$DISPLAY was not particularly useful and resulted in a crash for long
values of $DISPLAY.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com >
Reviewed-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 18:36:39 -05:00
Jamey Sharp
eed0d80133
Nested X screens don't have a RAMDAC.
...
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 15:51:41 -05:00
Jamey Sharp
8290a399dd
Don't scale the absolute axis valuators.
...
Peter Hutterer told me I needed to set the valuator ranges, but I don't
want the input core to scale the coordinates. Setting the min and max to
-1 apparently has the right effect.
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 15:35:47 -05:00
Jamey Sharp
4ef61d6bf8
Fix #includes when xserver is in a non-standard prefix.
...
Jeremy Huddleston tried building this with xserver's --prefix set to
/opt/Xorg and found that these #includes only worked so far by
coincidence.
Signed-off-by: Jamey Sharp <jamey@minilop.net >
Tested-by: Jeremy Huddleston <jeremyhu@apple.com >
2011-09-14 14:55:31 -05:00
Jamey Sharp
8d80f2e415
Update for input ABI 12.2.
...
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-09-14 14:36:13 -05:00
Jamey Sharp
fceee17166
Remove and ignore build products.
...
Signed-off-by: Jamey Sharp <jamey@minilop.net >
2011-09-12 07:40:58 -07:00
Tim
042e24f513
initial upload of xorg/driver/xf86-video-nested
2011-04-30 02:50:45 -07:00
Colin Hill
3b3252b1f8
Updated authors.
2011-02-27 18:48:40 -08:00
Colin Hill
7f1dd59b90
Got rid of unsightly void pointers.
2011-02-23 13:43:07 -08:00
Colin Hill
9e4a487ab0
Fixed compiler warnings.
2011-02-22 19:00:18 -08:00
Weseung Hwang
75b43decf7
Fixed a warning; added window title display of the DISPLAY env. variable that the nested server is running on (and the screen number). Unfortunately, at this point the behavior is incorrect, returning the DISPLAY of the host that invoked the nested instance. Not sure how to pass the info from within the nested server back out to the host client to get the correct information...
2011-02-22 15:03:12 -08:00
Colin Hill
3d74a2c2e8
Added input.c
2011-02-16 23:40:35 -08:00
Colin Hill
b8c35929de
Massive code clean up. Mouse motion/buttons and keyboard works.
2011-02-16 23:40:13 -08:00
Colin Hill
b315b79f3f
Keyboard works.
2011-02-16 22:38:47 -08:00
Colin Hill
e651e956b9
Mouse button 1.
2011-02-16 22:12:38 -08:00