Commit Graph

5748 Commits

Author SHA1 Message Date
Peter Hutterer
6aef209ebc Change lastDeviceIdleTime to be per-device
Preparation work for per-device idle counters.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
2012-03-22 13:12:56 +10:00
Peter Hutterer
e884ff8ad4 xfree86: remove out-of-date comment
No idea what this was referring to but it goes past git history.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-22 11:33:20 +10: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
Keith Packard
75199129c6 Handle blank betweeen type and name in sdksyms.sh
indent sometimes adds a blank line between the type and the name in a
function declaration that includes _X_EXPORT, so handle that before
the files are re-indented.

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-03-21 12:33:19 -07:00
Jeremy Huddleston
cb6a32da27 XQuartz: Short-circuit activateX:
This also avoids a deadlock when calling activateX: before the server
thread has initialized

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22 21:15:10 -08:00
Jeremy Huddleston
1562c4a1ca XQuartz: Actually install the new locales
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22 21:15:09 -08:00
Jeremy Huddleston
d53235af85 XQuartz: Build fix for possible conflict of BOOL type
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-13 23:06:07 -08:00
Alan Coopersmith
ca64912c02 Namespace list api to reduce conflicts with similar system headers
Rename functions/macros from list_* to xorg_list_*
Rename struct from struct list to struct xorg_list.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
In-sed-I-trust: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-03 14:23:24 -08:00
Alan Coopersmith
1541e242d1 Stop including <sys/proc.h> from xf86_OSlib.h on Solaris
We don't need anything from that header (which defines /proc & kernel
structures for process information), and it causes some namespace conflicts.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-02-03 14:23:02 -08:00
Jeremy Huddleston
85cecd9811 XQuartz: Release all buttons and keys when deactivating
http://xquartz.macosforge.org/trac/ticket/486

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-30 14:23:08 -08:00
Jeremy Huddleston
47b457541b XQuartz: Toggle off fullscreen mode when XQuartz is hidden
http://xquartz.macosforge.org/trac/ticket/478

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Jeremy Huddleston
c2ba3f339f XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Jeremy Huddleston
bafedb7e9b XQuartz: Bump bundle version to 2.7.2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-27 21:33:50 -08:00
Colin Harrison
8e78bbb2d2 hw/xwin: Fix spelling of 'Canadian' in winkeybd.h
The Mounties always get their typo

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-27 11:57:36 +00:00
Colin Harrison
80c073352a hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()
Commit 3b36fd1b49 changed miPointerSetPosition()
to take co-ordinates as doubles, not ints, so this code as it stands is now wrong
(if it ever was correct in the first place :-))

It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition()
which potentially constrains the cursor, and then convert back to ints.

Fortunately, this whole dance seems to be unnecessary, and we can simply remove the
call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other
input driver.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-27 11:52:14 +00:00
Colin Harrison
ced9db6595 hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp
Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0.
That has no defined meaning I can find, but some graphics card drivers
appear to generate it on suspend/resume or screensaver activate/deactivate.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-26 14:45:02 +00:00
Jon TURNEY
bea6fb6c7a hw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction
The WIN_WINDOW_PROP is removed during WM_DESTROY handling, so it is not neccessary to
remove it in winDestroyWindowsWindow(), and doing so opens a race condition, as we may
attempt to access that property in the wndproc before the WM_DESTROY has completed.

A specific example of that race is if a WM_KILLFOCUS occurs in the window between property
removal and WM_DESTROY processing, where we will attempt to apply DeleteWindowFromAnyEvents()
on an invalid (null) WindowPtr.

Also guard against null WindowPtr in the WM_KILLFOCUS handler

See http://cygwin.com/ml/cygwin-xfree/2012-01/msg00009.html

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:31 +00:00
Jon TURNEY
9a709d5028 hw/xwin: Handle more motif window decoration hinting
Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU
decoration hints in a _MOTIF_WM_HINTS window property

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:30 +00:00
Oliver Schmidt
b8b0b841a0 hw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key
I also had problems with the AltGr key. These could reliably
be reproduced by holding the AltGr for some seconds (causing
Windows generating auto repeat events)

I discovered that the mechanism in winkeybd.c function
winIsFakeCtrl_L had a problem if PeekMessage cannot obtain
the next Alt_R message because it is not there yet.

I prepared a patch that remembers the last Ctrl_L event and
reacts on a later Alt_R.

It was also necessary to alter the order in winWindowProc() in
winwndproc.c: the invocation of winIsFakeCtrl_L had to be done
before discarding auto-repeated key presses, as winIsFakeCtrl_L()
now has an internal state which must be updated by all key events.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:28 +00:00
Jon TURNEY
3d3114d55a hw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops
Apparently, IBM Leonovo laptops can generate a key-press event for the Fn
key, with virtual key code 0xFF and scan code extended 0x63

Handle this specially, rather than just passing on key code 0x63 (delete),
so you don't delete what you just typed when you adjust the screen brightness,
etc. :-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:26 +00:00
Jon TURNEY
74af860f9a hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported
Try to be more intelligent with default options, turn on -emulate3buttons by
default if less than 3 mouse buttons are reported by Windows

Also, add -noemulate3buttons option so this default setting can be reversed
if desired

Also, correctly report the number of mouse buttons windows is reporting, rather
than always at least 3

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:25 +00:00
Jon TURNEY
c0f3709501 hw/xwin: In multiwindow mode, don't grab native input focus for new windows which hint they don't want it
In multiwindow mode, avoid grabbing the input focus for newly
created windows which have InputHint FALSE

(this is used by e.g. glean to avoid every test window grabbing
the focus)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:23 +00:00
Jon TURNEY
25caa8565d hw/xwin: Remove some redundant OS version reporting
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:20 +00:00
Roland Cassard
a9aca218f5 hw/xwin: Don't assume we'll always have converted the clipboard selection after 2 attempts
Rather than knowing we have to call winProcessXEventsTimeout() for up to 2 WIN_XEVENTS_CONVERT messages, process
all messages in winProcessXEventsTimeout() until either: (i) the time out expired, (ii) an error occurred, or
(iii) received a WIN_XEVENTS_NOTIFY messaage indicating the data has been to put on the clipboard.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:38:52 +00:00
Michel Hummel
75fe336b6c hw/xwin: Mitigate a race condition in clipboard thread initialization
Remove the variables g_fClipboardLaunched and g_fClipboardStarted from
winInitializeGlobals(), as their re-initialization is handled in the
file hw/xwin/InitOutput.c.

Re-initializing g_fClipboardLaunched and g_fClipboardStarted during
the server reset procedure can lead to the clipboard thread being
launched two times and sometimes leads to a crash of the X server...

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:48 +00:00
Jon TURNEY
95b1391fe3 hw/xwin: Chain IOError handlers to avoid longjmp across threads
Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the
result of setjmp() from a different thread, by chaining IOError handlers and only
jumping back up to the frame for this thread

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:24 +00:00
Yaakov Selkowitz
0659437f5e hw/xwin: Improve XWinrc loading and error recovery
If $HOME/.XWinrc is present but badly formed, ignore it and try
system.XWinrc instead.  If neither file is present or both are badly
formed, provide a built-in default which gives the user the chance to
load their new or fixed configuration without restarting.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:12 +00:00
Michel Hummel
47c7b6d3e6 hw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from being killed
Remove no-longer needed tricks used to hide the clipboard client from XDM to prevent
it from being killed

- Delete XQuery wrapper used to hide clipboard client
- Delete XDMCP mode heuristic which waits until some magic number of connections have
been established before starting the clipboard

We still need the EstablishConnection wrapper to ensure that the clipboard client isn't
the first client (causing a server restart if it disconnects)

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:09:35 +00:00
Michel Hummel
c1bf3baa44 hw/xwin: Automatically restart clipboard thread
Automatically restart clipboard thread on unexpected exit

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:09:02 +00:00
Jon TURNEY
ae981341a9 hw/xwin: Give the X window for the clipboard integration client a name
This makes it a bit easier to find when staring at the output of
'xwininfo -tree -root'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 13:42:06 +00:00
Adam Jackson
02775efb89 int10: Fix unmapping of the BIOS scratch area
342f3eac84 introduced a bug, 'base' is
incremented before use.  The old code corrected this when unmapping, so
the new code should too.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-25 09:26:23 -08:00
Jeremy Huddleston
ba0f5cc196 xfree86: Don't link libxorgxkb against libdix.la
libdix.a is already provided by XSERVER_LIBS.  Including it in libxorgxkb
results can result in duplicate symbols landing in the Xorg binary on some
configurations (buggy glibtool on darwin).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-15 02:28:27 -08:00
Jeremy Huddleston
2387fb2385 sdksyms.sh: Exit on error rather than building an empty symbol table
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-01-15 02:28:07 -08:00
Peter Hutterer
a6273cc85c xfree86: mention udev in the xorg.conf manpage AutoAddDevices section
And point out what "hotplugging" means.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-01-13 09:04:44 +10:00
Keith Packard
d9eeede52f Revert "dix: Pull client-is-local flag up to the ClientRec"
This reverts commit 49d38b75c8.

ABI change pended for 1.13
2012-01-12 12:09:59 -08:00
Keith Packard
e722ad6c3e Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes' 2012-01-09 13:22:28 -08:00
Adam Jackson
a55214d119 Always install xaa sdk headers
Always install XAA SDK headers so drivers still build even with
--disable-xaa

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Matthieu Herrb
dafc327f3c UnloadSubModule(): accept pointer value '1' and ignore it.
Some driver modules try to unload submodules that are now built-in.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Adam Jackson
8db029064b vgahw: Fix DACDelay() macro to use the driver's vtable
We don't want to unconditionally use I/O routines here, since if the
driver is using mmap'd VGA ports then the I/O handle won't be set up.

Tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Arthur Taylor
ff891bbf68 linux: Use K_OFF VT KB mode over K_RAW if available.
Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in
which special keys (like Ctrl+C) are not interpreted and input is not
buffered. Use of this mode over K_RAW removes the need for a
xf86ConsoleHandler to drain the VT input buffer, removing the grief it
causes when it goes wrong or is (de)initialized out-of-order. (This
also saves a few needless context switches per key event.)

If K_OFF is not defined or not understood by the kernel, K_RAW and the
previous method is used as a fall-back.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Arthur Taylor <art@ified.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:48 -08:00
Keith Packard
0b113f7cdf Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' 2012-01-09 13:07:25 -08:00
Keith Packard
0b2c6491c5 Merge remote-tracking branch 'whot/for-keith' 2012-01-09 11:40:23 -08:00
Keith Packard
1f5587e144 Merge remote-tracking branch 'kibi/master' 2012-01-09 11:37:59 -08:00
Jeremy Huddleston
a97252db24 XQuartz: GL: Buildfix for recent GLX changes
dispatch.h was leftover from an earlier implementation and is no longer
needed, so remove it since including it causes a build failure due to
conflicts between GL/gl.h and OpenGL/gl.h

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-08 23:23:14 -08:00
Ryan Pavlik
4e44580efd hw/xwin: Include manifest file in the dist tarball
Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST.

Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:48 +00:00
Ryan Pavlik
c763fe51b8 hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
but still provide it if building for Win32 without autotools

xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined
../../include/xwin-config.h:11:0: note: this is the location of the previous definition

Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:17 +00:00
Ryan Pavlik
3d80f202b0 hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:13 +00:00
Ryan Pavlik
c824004b45 hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:11 +00:00
Ryan Pavlik
3c501691a0 hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:09 +00:00
Ryan Pavlik
a492c02649 hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:08 +00:00