Commit Graph

5141 Commits

Author SHA1 Message Date
Jeremy Huddleston
c5975722a9 XQuartz: Fix make distcheck
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2010-11-14 10:25:58 -08:00
Jeremy Huddleston
965e709f2b XQuartz: Build-fixes for XQuartz for recent input API changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-12 11:49:49 +10:00
Peter Hutterer
fa50670c32 xfree86: rename allowEmptyInput to forceInputDevices.
This is a more accurate name for the actual functionality than
allowEmptyInput. Historically, allowEmptyInput has allowed the server to
start with no input devices. Since 1.4 and the introduction of VCP and VCK,
there are always two input devices present.

allowEmptyInput was changed in behaviour to essentially "ignore xorg.conf
devices or not", auto-adding the built-in devices if disabled.

Rename to forceInputDevices, because that's essentially what it does. When
disabled (i.e. when hotplugging is enabled), it disables all
mouse/kbd/vmmouse devices configured in the xorg.conf file.
When enabled, it forces the traditional behaviour for input devices:
- use input devices configured in the server layout
- if none are configured, use the first pointer and the first keyboard
  device in the xorg.conf
- if none are configured, create the default pointer/keyboard devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-12 11:49:48 +10:00
Jesse Adkins
23e329b564 xfree86: parser: Remove 'CUSTOM' flag option in Monitor section.
Not used in the initial import, and also not documented.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-11-10 21:35:58 -08:00
Peter Hutterer
88cb61e1e5 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts:
	dix/getevents.c
	hw/xfree86/common/xf86Xinput.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 12:54:46 +10:00
Keith Packard
4ed4915bc0 Merge remote branch 'whot/for-keith' 2010-11-10 16:58:21 -08:00
Peter Hutterer
ec1bfbc669 xfree86: remove user-configured AllowEmptyInput
An estimated 100% (rounded down to the nearest percent) of the people who
have this in their configuration don't actually know what this option does.
Protect the users from themselves.

IIRC, AEI on was useful for some time between 1.4 and 1.5 and never since.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-11-11 10:26:46 +10:00
Keith Packard
c9c0f93f8e Merge remote branch 'whot/for-keith' 2010-11-10 16:11:29 -08:00
Keith Packard
73f6de1ad8 Merge remote branch 'sandmann/fbdelete' 2010-11-10 16:02:22 -08:00
Eric Anholt
f36153e3ef Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.
In all these cases, any rendering implied by this damage has already
occurred, and we want to get the damage out to the client.  Some of
the DamageRegionAppend calls were explicitly telling damage to flush
the reportAfter damage out, but not all.

Bug #30260. Fixes the compiz wallpaper plugin with client damage
changed to reportAfter.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 15:51:03 -08:00
Luc Verhaegen
cc2c73ddcb x86emu: fix jump_near_IMM to handle DATA: flag correctly.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348

Before (data flag ignored -> broken):
66                  DATA:
e944f1              JMP       1ff6

After (fixed):
66                  DATA:
e944f1ffff          JMP       00001ff8

This subtle difference in the length of decoded instruction meant
that the VBE call jumped to the routine setting AX=0x14F (VBE Failed)
instead of the routine that set AX=0x4F (VBE success).

The ability to run the same code in vm86 significantly aided the
debugging of this issue. Those X.org developers who would like to drop
vm86 better take special care towards _all_ vesa bugs, as those will
expose further issues.

Patch applies easily to even xserver 1.4.2.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Tested-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:56:57 -08:00
Samuel Thibault
a6c64d9645 Do not trap access to timer and keyboard
Disable timer/keyboard trapping on GNU/Hurd for now

Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these
ports, and the int10 wrapper is not emulating them.

It's effectively what happens in the Linux variant too, as iopl() is used there,
making the ioperm() meaningless.

Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:42:44 -08:00
Pauli Nieminen
383dfe23f1 DRI2: Avoid call to NULL pointer
DDX driver may implement schedule swap without GetMSC. In that case we
can't call GetMSC in DRI2SwapBuffers.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
CC: Keith Packard <keithp@keithp.com>
CC: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 14:38:09 -08:00
Cyril Brulebois
68e4a628d6 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL) {
-   free(E);
- }
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:30:26 +10:00
Cyril Brulebois
b142b0d274 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL)
-   free(E);
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:29:54 +10:00
Cyril Brulebois
0649ac0afd Remove more superfluous if(p) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E)
-   free(E);
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:28:50 +10:00
Cyril Brulebois
99275ad2fa Remove superfluous if(p!=NULL) checks around free(p); p=NULL;
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
-  if (E != NULL) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
-  }
+ free(E);
+ E = NULL;

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:22:59 +10:00
Peter Hutterer
4132b1c591 xfree86: fix compiler warnings - unused variable i
../../../../hw/xfree86/common/xf86Config.c: In function 'configDRI':
../../../../hw/xfree86/common/xf86Config.c:2213:9: warning: unused variable
'i'

Introduced in 788bfbf18a

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-05 15:53:59 +10:00
Peter Hutterer
6b982d73bb xfree86: fix two compiler warnings - unused variable ati, atimisc
../../../../hw/xfree86/common/xf86Config.c: In function
'fixup_video_driver_list':
../../../../hw/xfree86/common/xf86Config.c:507:19: warning: unused variable
'atimisc'
../../../../hw/xfree86/common/xf86Config.c:507:12: warning: unused variable
'ati'

Introduced in 52577ae8ee.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-05 15:53:44 +10:00
Peter Hutterer
0799f0771c xfree86: remove two unused variables from Makefile.am
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-05 09:30:14 +10:00
Keith Packard
a52efb096e Merge remote branch 'sthibaul/master-iopl' 2010-11-03 06:50:45 -07:00
Søren Sandmann Pedersen
74bc2d8c6b render: Delete renderedge.[ch]
The functions in these files have not been used since trap
rasterization was moved to pixman. They survived until now to preserve
the server abi.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-01 22:54:18 -04:00
Peter Hutterer
19f43836d1 Re-export xf86CollectInputOptions.
Some drivers, most notably the mouse driver need this and reimplementing on
the driver side doesn't make sense.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-25 15:10:19 +10:00
Samuel Thibault
f72aadd38b hurd: Fix use of deprecated iopl device
Fix Xserver on GNU/Hurd into using the "mem" device instead of
the deprecated "iopl" device.

Reviewed-by: Olaf Buddenhagen <antrik@users.sf.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2010-10-24 14:09:35 +02:00
Peter Hutterer
dd11f734a9 input: remove "mode" field from ValuatorClassRec.
We have per-axis mode now. For those bits that still need it (XI 1.x),
assume that the first axis holds the device's mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:19:00 +10:00
Peter Hutterer
e909af88bf dmx: clarify a valuator mode condition.
Relative is defined as 0, so change the condition to be more obvious.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:18:59 +10:00
Chase Douglas
65c0fc81eb Add support for per-axis valuator modes (Relative/Absolute)
The XI2 protocol supports per-axis modes, but the server so far does
not. This change adds support in the server.

A complication is the fact that XI1 does not support per-axis modes.
The solution provided here is to set a per-device mode that defines the
mode of at least the first two valuators (X and Y). Note that initializing
the first two axes to a different mode than the device mode will fail.

For XI1 events, any axes following the first two that have the same mode
will be sent to clients, up to the first axis that has a different mode.
Thus, if a device has relative, then absolute, then relative mode axes,
only the first block of relative axes will be sent over XI1.

Since the XI2 protocol supports per-axis modes, all axes are sent to the
client.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 13:37:57 +10:00
Paulius Zaleckas
8990b31214 KDrive: Fix error handlig in tslib driver
If ts_open() fails and return NULL, then next call to ts_fd()
segfaults because of NULL dereference. There is no need to
check output of ts_fd() as ts_open() did this internally.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-22 13:36:10 +10:00
Peter Hutterer
2b04a3ef73 xfree86: convert xf86Post{Motion|Key|Button|Proximity}Event to masks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:53 +10:00
Peter Hutterer
675f4a8525 Abstract valuator masks through a set of APIs.
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.

The new calls for drivers are:
    valuator_mask_new()     /* to allocate a valuator mask */
    valuator_mask_zero()    /* to reset a mask to zero */
    valuator_mask_set()     /* to set a valuator value */

The new interface to the server is
    xf86PostMotionEventM()
    xf86PostButtonEventM()
    xf86PostKeyboardEventM()
    xf86PostProximityEventM()

all taking a mask instead of the valuator array.

The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.

For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.

This patch was initially written by Chase Douglas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:48 +10:00
Keith Packard
d738175eaf Merge remote branch 'whot/for-keith' 2010-10-19 22:50:15 -07:00
Peter Hutterer
9872e0f011 xfree86: set mask for valuators 0/1 when emulating core events (#30267)
EventToCore as of the commit below won't generate core motion events if the
valuator mask for x/y isn't set. For DGA, we work around this check by
forcibly setting the mask in the event we pass down.

commit de8be07cc0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Aug 17 12:08:52 2010 +1000

    dix: don't create core motion events for non-x/y valuators.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Andrew Randrianasulu <randrik@mail.ru>
Tested-by: Andy Furniss
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-10-20 08:02:38 +10:00
Jon TURNEY
25801a2556 Cygwin/X: Move duplicate extern variable declarations from various .c files to a new header file
For the global variables defined in winglobals.c, remove duplicate extern
declarations from the beginning of various .c files, and move most of them
into a new header file, winglobals.h

Leave some clipboard related variables alone for the moment, they need treating
more carefully, to avoid mixing client and server type definitions.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:02:00 +01:00
Jon TURNEY
04d11abcf2 Cygwin/X: Remove g_hwndKeyboardFocus
It's set but it's value is never used

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:58 +01:00
Jon TURNEY
5e896e425f Cygwin/X: Make g_hmodCommonControls static
Make g_hmodCommonControls static, it's only used in InitOutput.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:56 +01:00
Jon TURNEY
49b996faad Cygwin/X: Make g_hmodDirectDraw static
Add winReleaseDDProcAddresses() for releasing the direct draw module
handle, so g_hmodDirectDraw can be made static

Remove unneeded duplicate extern definitions of g_fpDirectDrawCreate
and g_fpDirectDrawCreateClipper, and move the definition from
winglobals.c to winengine.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:55 +01:00
Jon TURNEY
6f12277e37 Cygwin/X: Make g_hhookKeyboardLL static
Make g_hhookKeyboardLL static, it's only used in winkeyhook.c

Also remove unused externs

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:53 +01:00
Jon TURNEY
9952b51f68 Cygwin/X: Fix typos in comments
Fix a few typos in comments

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:51 +01:00
Jon TURNEY
1de5db73d3 Cygwin/X: Drop several unneeded includes of winprefs.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:50 +01:00
Colin Harrison
8e72310815 Xming: Remove uses of register keyword
I'm pretty sure the compiler has a better idea how to optimize this

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 15:01:48 +01:00
Colin Harrison
d11761c6a6 Xming: Casts to remove warnings on event pointers
winkeybd.c: In function ‘winSendKeyEvent’:
winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winMouseButtonsSendEvent’:
winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winEnqueueMotion’:
winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 15:01:19 +01:00
Colin Harrison
10bf8345cf Xming: Warning fix in winDeviceCursorCleanup()
return statement with an expression in a function whose return-type is void

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:42:16 +01:00
Jon TURNEY
cab837a60a Cygwin/X: Reformat the keyboard layout mapping table
Also remove the out-of-date listing of keyboard layout IDs and which ones
have known mappings

XXX: layout zh_TW doesn't exist anymore

This patch brought to you by C-u M-x align-regexp

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:41:40 +01:00
Jon TURNEY
ee2867649d Cygwin/X: Clarify XKB options in XWin man page
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:40:53 +01:00
Colin Harrison
1ba1b12d24 Xming: Warning fix in winApplyHints()
winmultiwindowwm.c: In function ‘winApplyHints’:
winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:38:32 +01:00
Colin Harrison
fb64414548 Xming: Fix warnings in ProcWindowsWMFrameSetTitle()
winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’:
winwindowswm.c:516: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness
winwindowswm.c:516: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
winwindowswm.c:528: warning: pointer targets in passing argument 2 of ‘SetWindowTextA’ differ in signedness

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:38:30 +01:00
Colin Harrison
da5955cc02 Xming: Fix warnings in windialogs.c
windialogs.c: In function ‘winDisplayExitDialog’:
windialogs.c:327: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winDisplayAboutDialog’:
windialogs.c:597: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winAboutDlgProc’:
windialogs.c:697: warning: comparison between pointer and integer
windialogs.c:701: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘HINSTANCE’
windialogs.c:716: warning: assignment makes integer from pointer without a cast
windialogs.c:736: warning: assignment makes integer from pointer without a cast
windialogs.c:756: warning: assignment makes integer from pointer without a cast

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:35:38 +01:00
Colin Harrison
6d9fb07db2 Xming: Fix warnings in winNameCompare(), winNormalizeName()
winconfig.c: In function ‘winNameCompare’:
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c: In function ‘winNormalizeName’:
winconfig.c:1092: warning: array subscript has type ‘char’
winconfig.c:1093: warning: array subscript has type ‘char’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:28:28 +01:00
Colin Harrison
20510e5100 Xming: Fix warnings in winClipboardFlushXEvents()
winclipboardxevents.c: In function ‘winClipboardFlushXEvents’:
winclipboardxevents.c:225: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:266: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:619: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness
winclipboardxevents.c:659: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
winclipboardxevents.c:669: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:690: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:698: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:27:33 +01:00
Colin Harrison
44c8b449d2 Xming: Fix warning in winClipboardErrorHandler()
winclipboardthread.c: In function ‘winClipboardErrorHandler’:
winclipboardthread.c:444: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:26:19 +01:00
Jon TURNEY
1f2a57d9e4 Cygwin/X: Turn off the bad-function-cast warning for XWin code
Turn off the bad-function-cast warning for the XWin code, it's near impossible
to write code which uses Win32 API calls that doesn't trigger this warning

For example, SendMessage(WM_SETICON) returns an LRESULT, but we are supposed to
know this is safe to cast this result to a HICON, which gcc considers a non-matching
type.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:20:05 +01:00
Jon TURNEY
55e528b6cc Cygwin/X: Remove execute permission from source files
Remove execute permission from source files

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:19:29 +01:00
Jon TURNEY
b2b685e269 Cygwin/X: unifdef XFree86Server
Remove XFree86Server define, which was always on anyhow, and the
code which was guarded by !XFree86Server

This completes the process of removal started in 2006 :-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:17:21 +01:00
Jon TURNEY
9ed70f15ef Cygwin/X: Use normal apostrophe in XWin DDX help text
Use U+0027 APOSTROPHE in XWin DDX help text, rather than
U+2019 RIGHT SINGLE QUOTATION MARK

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:15:38 +01:00
Jon TURNEY
9f8f056a21 Cygwin/X: Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft
Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:02:33 +01:00
Keith Packard
5aff712a8d Merge remote branch 'whot/for-keith' 2010-10-18 17:16:23 -07:00
Olivier Fourdan
7bb653bedc modes: improve aspect ratio match for classic drivers
After we infer the aspect ratio for the screen, we pick the largest
mode matching that aspect ratio from the best mode pool available.
We then clamp virtual size to that mode, and run the resulting mode
list through the driver's ValidMode hook.  In doing so we might filter
away our initial guess.  If this happens we shrink the default mode
to the next largest mode from _any_ mode pool.  This is usually wrong,
and we should instead pick the next aspect-matched mode from the best
available mode pool (as always, user then driver then default).

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 17:38:23 -04:00
Adam Jackson
d2064fbb68 ddc: Don't probe for DDC/CI or EEPROM
For whatever reason, some (broken) monitors will crash if you do this.
We're not actually using this information for anything, so let's just
not do it.

Originally reported as http://bugzilla.redhat.com/620333

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:42:54 -04:00
Adam Jackson
47c91dca8d xfree86: Drop linux libc5 support from the SIGIO code
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:40:28 -04:00
Adam Jackson
788bfbf18a dri1: Remove "buffers" from the config logic
This was only ever used from the glint driver, which has since lost its
DRI support.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:34:08 -04:00
Adam Jackson
a77458486a xfree86: Remove %M expansion from config parser
This was to distinguish XFree86 3.x files from XFree86 4.x files.  It
never really made sense to be looking for xorg.conf-4.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:33:27 -04:00
Adam Jackson
f8ec71603c xfree86: Remove an open-coded strtoul()
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:33:02 -04:00
Adam Jackson
52577ae8ee config: Remove atimisc workaround
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:32:21 -04:00
Adam Jackson
8bb1983a5f config: Don't look for .o drivers anymore
This hasn't worked since we switched to dlloader.

Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 15:31:23 -04:00
Peter Hutterer
eaf0b6a4d8 Merge branch 'master' into input-api
Conflicts:
	config/udev.c
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86Module.h
	hw/xfree86/common/xf86Xinput.h
	hw/xfree86/os-support/linux/lnx_init.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-15 13:46:59 +10:00
Peter Hutterer
3c28a29e13 xfree86: rename parameter names to xf86ScaleAxis.
Maybe it's just me but every time I look at it I get confused again and need
to work it out from scratch. Rename the parameters to something
self-explanatory, to/from and min/max.

No functional change.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-10-15 11:56:27 +10:00
Adam Jackson
e418cd332c xwin: Remove some undue paranoia about UNDRAWABLE_WINDOW
mi will throw away rendering to input-only windows.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:21:27 -07:00
Adam Jackson
febf3e7ead dix: Remove the memory of the multibuffer extension
Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that
used them and it was killed in 0ba82562.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:18:41 -07:00
Adam Jackson
853d7ebfa3 vbe: Fix copying the mode info block
Just use memcpy, seriously.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-05 10:20:43 -07:00
Adam Jackson
b2f9ce201c edid: Fix the HDTV sync pulse adjustment
Simple typo, should have been adjusting the horizontal timings
consistently since we're not trying to mangle vertical at all.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-05 08:19:25 -07:00
Chris Wilson
9a893fe52f xfree86: Do not call dlclose(NULL) [regression after ab7f057]
During unwind following an error when attempting to a load a module, we
attempt to call dlclose on a potentially NULL handle. This is a
side-effect of removing the abstraction layer in ab7f057.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Adam Jackson <ajax@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-04 11:46:07 -07:00
Jon TURNEY
72a9c686d7 Cygwin/X: Fix compilation after "delete pervasively use of DISPATCH_PROC"
commit cbd4d5dbb7
removes the static declarations of ProcWindowsWMDispatch and
SProcWindowsWMDispatch which precede their first use in
winWindowsWMExtensionInit()

Move winWindowsWMExtensionInit() to after the definition of those
two functions to fix compilation.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-29 12:15:11 -07:00
Aaron Plattner
1a9022d328 Bump video driver ABI version to 9.0
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 15:52:38 -07:00
Jeremy Huddleston
c45bea0c04 XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR
Adds three new functions
void QuartzRandRSetFakeRootless (void);
void QuartzRandRSetFakeFullscreen (void);
void QuartzRandRToggleFullscreen (void);

The first two are identical to requesting the fake modes from a RandR client
The third responds to cmd-alt-a to leave fullscreen or RandR.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 10:09:11 -07:00
Jeremy Huddleston
229323a19b XQuartz: RandR: Don't change the rootless preference when changing RandR mode
Also renames a bunch of other variables for better consistency.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:35 -07:00
Jeremy Huddleston
721edc69c3 XQuartz: RandR: Better handle switching betwen RandR modes that share CG modes
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:35 -07:00
Jeremy Huddleston
026a47e212 XQuartz: RandR: Respond better to resolution changes made outside X
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jeremy Huddleston
59cd93f48a XQuartz: RandR: Use deprecated CG APIs only on Leopard and earlier
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
629c3f473b XQuartz: RandR: Remove FAKE_RANDR code.
Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
97b5f53064 XQuartz: RandR: Toggle rootless mode on XRandR mode switch.
Report a fake screen mode that corresponds to the screen mode at startup of the
server excluding the height of the menu bar. If a client requests this mode,
rootless mode is enabled. In all other modes, the root window is shown.

Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jan Hauffa
2d411472c2 XQuartz: RandR: Implement basic RandR functionality.
Querying and changing of resolution and refresh rate is supported,
rotation is not implemented yet.

Signed-off-by: Jan Hauffa <hauffa@in.tum.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jeremy Huddleston
f492670948 XQuartz: Move use of static dispatch procs after declaration
This fixes fallout from cbd4d5dbb7

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Keith Packard
5532687a92 Merge remote branch 'ajax/less-loader' 2010-09-28 08:15:07 -07:00
Adam Jackson
9df4fb0adf xfree86: Add 18bpp support
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:13:07 -07:00
Chris Wilson
5c6a2f93eb xfree86: Kill pixmapPrivate with a vengeance (v2)
ScrnInfo->pixmapPrivate only existed in order to catch invalid access to
the framebuffer by making the backing data NULL across the VT switch.
This was causing more confusion in the higher layers during mode setting
without any real benefit, so remove it.

v2: Kill ShadowModifyPixmapHeader() as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Julien Cristau <jcristau@debian.org>
Cc: Andrew Guertin <lists@dolphinling.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:07:21 -07:00
Chris Wilson
fdabcec57a modes: Beware the driver switching root pixmaps
Program received signal SIGSEGV, Segmentation fault.
0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800,
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
731     ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory.
        in ../../../../hw/xfree86/modes/xf86RandR12.c
(gdb) bt full
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
        randrp = 0x8dcae68
        pScrn = 0x8dbeb28
        config = <value optimized out>
        pRoot = 0x8e08e30
        pScrnPix = 0xb6d12008
        ret = 1
        c = <value optimized out>
    mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185
No locals.
    at ../../randr/rrscreen.c:307
        pWin = 0x8e08e30
        pScreen = 0x8dca3a0
        i = <value optimized out>
        rc = 0
../../randr/randr.c:485

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Julien Cristau <jcristau@debian.org>
Tested-by: Julien Cristau <jcristau@debian.org>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-28 08:07:21 -07:00
Tiago Vignatti
cbd4d5dbb7 xserver: delete pervasively use of DISPATCH_PROC
Some functions had to be moved around due some missing static definitions.
Another minor clean up like inexistent function declarations and etc were made
also.

Part of this patch was cooked using:
sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-28 16:45:05 +03:00
Macpaul Lin
58bd317e29 xfree86: nds32: add nds32 support for compiler related mmio codes
Add nds32 support for compiler related mmio codes.
It includes byte-swap or non-swap operations.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:40 -07:00
Macpaul Lin
28e6de66b4 xfree86: nds32: add nds32 support for compiler specific codes
Add nds32 definitions and related assembly codes to compiler header files.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:31 -07:00
Macpaul Lin
2b24b2bd85 xfree86: nds32: add nds32 definition for vgaHW support.
Add __nds32__ definitions for vgaHW support.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:19 -07:00
Macpaul Lin
22376aa7aa xfree86: nds32: add nds32 definition for support linux video related io.
Add __nds32__ definitions for supporing correct io method for lnx_video.c

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:10 -07:00
Keith Packard
98197d931b Merge remote branch 'jamey/for-keith' 2010-09-23 15:30:37 -07:00
Adam Jackson
682a3ee608 xfree86: Remove useless module setup functions where appropriate
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:22 -04:00
Adam Jackson
6130170e7e xfree86: Remove unused refcounting from input drivers
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:17 -04:00
Adam Jackson
ab7f057ce9 loader: Remove a silly layer of reference counting
libdl will refcount objects for us just fine, thanks.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:12 -04:00
Adam Jackson
0438002cd2 loader: include cleanup
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:07 -04:00
Adam Jackson
2f003fe496 loader: Remove the handle field from LoaderOpen
This was always 0 from all the callers.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:57:02 -04:00
Adam Jackson
09929da505 loader: Remove unused canonical name field
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:56:57 -04:00
Adam Jackson
3a26e7f459 loader: Remove unused module serial number
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:56:53 -04:00
Adam Jackson
2a24a013bf loader: Merge dlloader directly into the loader
This lets us drop some double-tracking of loaded modules too.  If your
OS is too lame to have libdl, fix that first.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-22 10:55:55 -04:00
Peter Hutterer
693e92d404 xfree86: add xf86OptionListDuplicate()
Does what it says on the box.

Some drivers need to duplicate option lists from the original device to
ensure that devices created by the driver (driver-internal hotplugging) have
the same list of options as the original device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-18 13:55:37 +02:00
Jamey Sharp
e4d4d6ddd5 Xserver need not be compatible with old versions of xserver.
Delete time-traveling multiple personality disorder from the server.

Gaetan notes:

    There were a couple of drivers containing an unknown version of the
    modes/parser code. This was done in server 1.2 time frame because it
    was released without mode code. It was barely or not maintained
    afterwards. There are currently no video drivers with a copy of the
    modes code.

Most of these ifdefs were introduced in commit
a8d760f567, where Aaron wrote,

    This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer
    than 1.2" since XORG_VERSION current went backwards at some point.

Alan explains that:

    In Xorg 1.3, when we first released an Xorg server release decoupled
    from the katamari release schedule.  (1.0 through 1.2 were released
    as part of X11R7.0 through 7.2, while 1.3 came out between X11R7.2 &
    7.3.)

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-09-18 11:17:18 +02:00
Tiago Vignatti
01ad3725a8 xfree86: delete useless "Primary device is not PCI" message
The primary device being PCI or not has no effect on the server working. This
message is superfluous.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:31 +03:00
Tiago Vignatti
7360235ecc xfree86: bus: assign PCI_SOURCES with the actual source files
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:23 +03:00
Tiago Vignatti
18b2d2e8bd xfree86: bus: move macros from common PCI header to private file
Only int10/helper_exec.c is using them.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:15 +03:00
Tiago Vignatti
17a23f9ba8 xfree86: dri: remove unused PCI macro
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:09 +03:00
Tiago Vignatti
fc3ab84de7 xfree86: configure: move buses references to their own location
This patch makes xf86Configure.c free of PCI and SBUS code, moving to a more
meaningful location.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2010-09-14 18:51:59 +03:00
Tiago Vignatti
49b817501f xfree86: bus: remove xfree86 and few other references from OS files
Conceptually, os-support should have only a basic set of OS helpers which
wouldn't mix with any DDX common structure (e.g. windowing structures, etc)

This patch removes some xfree86-only and a few other unused references from
os-support/bus.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:50:57 +03:00
Tiago Vignatti
d9c682a5e2 xfree86: bus: remove useless automake variable
Leftover that was missed in f7abe05b.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:43:15 +03:00
Tiago Vignatti
a7efeda8a5 xfree86: use xf86PciIsolateDevice to get PCI config information
Make xf86IsolateDevice private on PCI common file.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:42:54 +03:00
Keith Packard
c768cdda92 Merge remote branch 'jamey/reviewed' 2010-09-13 16:48:33 -07:00
Jamey Sharp
2079853632 rootless: Delete dead remnants of rootless acceleration.
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1c. Delete its prototype and the
remaining commented-out call to it.

It still makes sense for the rootless GC ops to relax the planemask, but
that's independent of the size of the operation, so quit checking the
thresholds there.

FillBytes and CompositePixels are not called anywhere, so delete
everything related to both.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
35ce892a70 rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
af2a94e12f VGA arbiter: No need for arbitration around CreateGC.
None of XAA, EXA, or UXA do any hardware access during CreateGC, so they
don't need VGA arbitration. I haven't found any open source drivers that
hook CreateGC, so they're safe. I'd be surprised if any driver directly
hooks CreateGC and does hardware access from it and needs VGA
arbitration.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
2e8069dd36 xnest: Replace use of Colormap->devPriv with standard devPrivates.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
34d6492436 xquartz: Delete compile-time-constant DRIGCRec.driOps field.
The driOps field of this structure is never set to anything but
&driGCOps, and this structure is not visible outside this source file.
Just use the constant in the one place the field was used.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
bbbf795e6b Delete redundant GC initializations.
When a GC is allocated, it is zeroed, including all storage requested
with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize
anything to zero.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
3288232f3d Delete xaaWrapper.
This was part of "An experimental pseudocolor emulation layer. Not fully
completed, currently only works for 16bpp." Only neomagic tried to use
it, and that was neutered by the removal of the fbpseudocolor portion of
that emulation layer; the rest is easily removed.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
f856dcdc3a Delete unused lastWinOrg field from GCs.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-13 15:55:17 -07:00
Jamey Sharp
b218402436 Delete unused devPrivate field from GCFuncs and GCOps.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
e99bbfa0a2 dmx: Delete '#undef Xmalloc' and friends.
Nothing in dmx uses these names any more, and it builds cleanly without
trying to undef them.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:16 -07:00
Jamey Sharp
b5217bfdca dmx: __glXMalloc -> malloc, etc.
Kristian made equivalent edits to the reference GLX implementation in
2006, with commit 2d2d38d17c.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:16 -07:00
Jamey Sharp
a715de7f11 dmx: Delete unused GLX visual matching code.
Kristian deleted this API from the rest of the server in 2007, in commit
7d74690536.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-13 15:55:16 -07:00
Tiago Vignatti
5a725385fb xfree86: vgaarb: fix decoding stub API
This fix a problem introduced in commit 65466652. It closes also:
https://bugs.freedesktop.org/show_bug.cgi?id=30160

Reported-by: <xunx.fang@intel.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-13 10:41:26 -07:00
Jeremy Huddleston
0a3e6b0345 XQuartz: Localization updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-11 14:25:21 -07:00
Tiago Vignatti
63b7d9448a xfree86: fbdevhw: remove unnecessary debug code
It very likely no one will want to print all functions of this file for
debugging purposes. If this is the case, then a mix of ctags + cpp + gdb
can do the same job.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-10 21:49:29 +03:00
Tiago Vignatti
66105d8281 xfree86: fbdevhw: remove unused cmap fields from main structure
It was never used since first git revision and probably no one cares for it.

ABI break.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-10 21:49:29 +03:00
Tiago Vignatti
a9e6080dc9 os/xfree86: remove macro checking for POSIX symbols
We assume already that our X implementation is POSIX compliant anyway. So
remove those redundant checking.

SA_SIGINFO is left there.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-10 21:49:28 +03:00
Keith Packard
bbffb85461 Merge remote branch 'whot/for-keith' 2010-09-10 11:55:34 -07:00
Keith Packard
ca0d578d29 Merge remote branch 'mattst88/master' 2010-09-10 11:50:27 -07:00
Keith Packard
fa22f97af6 Merge remote branch 'vignatti/vgaarb-fixes' 2010-09-10 11:47:41 -07:00
Aaron Plattner
6edbdb7f9e Tag sdksyms.c entries with source file and line number
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-10 11:45:03 -07:00
Peter Hutterer
9dca441670 xfree86: add a hook to replace the new console handler.
This hook is only necessary for the keyboard driver to remove the race
condition between drain_console() and the driver's ReadInput (Bug 29969).

The idea is that a driver that needs to handle events from the console
calls xf86ReplaceConsoleHandler() with it's own ReadInput (or NULL) and thus
removes the drain_console call. It's the driver's responsibility to restore
the previous behaviour when the driver is unloaded.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
CC: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-09-10 09:09:47 +10:00
Thomas Hellstrom
da31ca747f linux: Don't lose console events on non-evdev drivers (#29969)
The drain_console() function will race with new keyboard events being added
by the hardware causing the server to lose keyboard events if the console fd
is used for input.

Only use the drain_console() when AllowEmptyInput is off which is the best
indicator we have for whether the keyboard driver will be used. This patch
will only fix the bug when hotplugging is disabled.
What we really need is a way to figure out either whether we're _not_ using
the keyboard driver (not predictable) or a way for the keyboard driver to
disable drain_console().

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

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 71972c2534)
2010-09-10 09:09:46 +10:00
Peter Hutterer
52df92a563 xfree86: move XI_VERIFY_VALUATORS to the source file it's used in.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:46 +10:00
Peter Hutterer
824e970c5c xfree86: remove TS_Raw and TS_Scaled defines.
There are no references to it other than the commit that added them. But
since we're re-doing the API anyway, now is a good time to break things.

commit 9398d62f27
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Wed Mar 21 00:18:24 2007 +0200

    XFree86 input: Add backwards compatibility for motion history
    Add the old motion history API back, as a shim around the new mi
    API.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:46 +10:00
Peter Hutterer
ac3f88e604 xfree86: remove {Dont}SendCoreEvents defines
The input drivers that use it only do so with ABI 0 and we're long past this
one now. Input driver don't have a say in whether they send core events now
anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:46 +10:00
Peter Hutterer
3f264149ff xfree86: don't export xf86InputDevs.
Use xf86FirstLocalDevice() instead (but don't get me started on the naming
of that one...)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:09:40 +10:00
Peter Hutterer
8f0531bdda xfree86: remove XI_PRIVATE macro, unused.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:09:32 +10:00
Peter Hutterer
c08f7afdbc xfree86: update comment for xf86DeleteInput
We have a driver hook - it's UnInit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:09:21 +10:00
Peter Hutterer
b8d9c5ff00 xfree86: remove IDevRec, replace with InputInfoRec.
This struct is superfluous, maintaining the same info as the InputInfoRec
(with the exception of the driver name).

This is a rather large commit with the majority of changes being a rename
from the fields of the IDevRec (idev, commonOptions) to the InputInfoRec
(pInfo, options).

The actual changes affect the initialization process of the input device:
In NewInputDeviceRequest, the InputInfoRec is now always allocated and just
added to the internal list in xf86NewInputDevice() if the init process
succeeded.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:20 +10:00
Peter Hutterer
c5da32a610 xfree86: plug minor memory leak.
When no identifier for the device was specified, the allocated IDevRec (and
its associated fields) need to be freed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:09:12 +10:00
Peter Hutterer
34ade08174 xfree86: Remove extraOptions parameter from xf86CollectInputOptions.
And unexport it, drivers don't need to call this in the new init process.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:11 +10:00
Peter Hutterer
2199842ed5 xfree86: remove extraOptions field from IDevRec.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-10 09:09:11 +10:00
Peter Hutterer
5ab8ca0807 xfree86: remove some ifdef 0 code.
InputInfoRec hasn't had a free function pointer since the git import.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:09:02 +10:00
Peter Hutterer
b0da1bc509 xfree86: move a declaration down to the block it is used in.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:08:54 +10:00
Peter Hutterer
cd7059db4a xfree86: minor comment fix. HAL → config backend
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:08:46 +10:00
Peter Hutterer
f3861522fe xfree86: skip a few NULL initialization, calloc does it for us.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:08:39 +10:00
Peter Hutterer
1217097861 xfree86: remove conversion procs and close proc from InputInfoRec.
None of them are called by the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-09-10 09:08:27 +10:00
Thomas Hellstrom
71972c2534 linux: Don't lose console events on non-evdev drivers (#29969)
The drain_console() function will race with new keyboard events being added
by the hardware causing the server to lose keyboard events if the console fd
is used for input.

Only use the drain_console() when AllowEmptyInput is off which is the best
indicator we have for whether the keyboard driver will be used. This patch
will only fix the bug when hotplugging is disabled.
What we really need is a way to figure out either whether we're _not_ using
the keyboard driver (not predictable) or a way for the keyboard driver to
disable drain_console().

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

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-09 10:53:34 +10:00
Peter Hutterer
e00e2e7b68 xfree86: Check for existence of button class before dereferencing it.
The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones
keyboards have axes but not buttons. The evdev driver doesn't set up a
button class for these keyboards and a motion event handled by
DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a
server crash.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-06 13:13:42 +10:00
Peter Hutterer
9802cca816 Remove atom field from InputInfoRec.
This field was only used in one location where we can use a local variable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-06 12:44:17 +10:00
Peter Hutterer
79ea9ef399 input: constify valuators passed in by input drivers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-06 12:44:10 +10:00
Jesse Adkins
be978c7fc9 xfree86: Purge kbdCustomKeycodes from xf86Info.
This was obsolete after 3eeb62e8f5 "bug #890: completely remove deprecated keyboard driver".

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:20 +10:00
Peter Hutterer
6922b31a13 xfree86: remove history_size
For a couple of ABIs now the history size was essentially static anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:20 +10:00
Peter Hutterer
892e39025b xfree86: remove always_core_feedback from InputInfoRec.
Unused

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:20 +10:00
Peter Hutterer
5e2912bd1d xfree86: remove first/last from InputInfoRec.
Unused.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:19 +10:00
Peter Hutterer
974bc2322b xfree86: remove private_flags from InputInfoRec.
Unused field.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:19 +10:00
Peter Hutterer
23b361b25b xfree86: Purge old_x/old_y from InputInfoRec.
Unused field.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 15:27:19 +10:00
Peter Hutterer
4ac3be29bc input: Purge AddOtherInputDevices DDX hook.
This hook wasn't used by any DDX. Device addition and removal is handled by
the config backend, so we don't need to do anything special that during the
ListInputDevices request processing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:52 +10:00
Peter Hutterer
cb672a461c input: remove OpenInputDevice and CloseInputDevice DDX hooks.
In theory, these hooks were to be used for DDX-specific device enablement.
None of the DDXs however did anything here. Now we call DEVICE_INIT on all
devices when they are added, so the xfree86 DDX as the only one with real
code didn't do anything here.

kdrive checked for device validity but that's already handled in
ProcXOpenDevice.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:51 +10:00
Simon Thum
a46d2bb344 xfree86: Fix xf86 backend-specific input initialization
Instead of shoving it in rather unrelated places, move acceleration init
into xf86NewInputDevice.

Caveat: It's not clear atm how relevant other callers of ActivateDevice
(like OpenDevice) actually are.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:51 +10:00
Peter Hutterer
e930710ae5 xfree86: purge superfluous includes from xf86Xinput.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:51 +10:00
Peter Hutterer
2b7840b63d xfree86: remove unused DeviceAssocRec struct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:50 +10:00
Peter Hutterer
cdb5863c9f xfree86: remove LocalDeviceRec/Ptr definition.
Two names pointing to the same struct for over 7 years now. Remove the
define, if drivers don't want to change they can always do the typedef
themselves.

Rename all "LocalDevicePtr local" to "InputInfoPtr pInfo".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:50 +10:00
Peter Hutterer
8764782f6d xfree86: add xf86IDrvMsg and friends for input driver logging.
Input driver messages are only standardised by convention, with the drivers
prefixing the device name to most messages. This makes it rather hard to
grep on "evdev" for example when looking for the evdev ouput.

This patch adds three new logging functions, modeled after xf86DrvMsg(), the
logging function for output drivers. New functions are
   xf86IDrvMsg()        - input driver log message in default verbosity.
   xf86IDrvMsgVerb()    - input driver log message in specified verbosity.
   xf86VIDrvMsgVerb()   - same as xf86IDrvMsgVerb() but takes a varargs
                          argument.

Default log format is <driver name>: <device name>: <message>.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:50 +10:00
Peter Hutterer
b55ac354af xfree86: move xf86AllocateInput and xf86DeleteInput to xf86Xinput.c
Make xf86AllocateInput static in the process, this function is only called
from one location.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:49 +10:00
Peter Hutterer
d2a5f41664 xfree86: return the device from xf86ActivateDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:49 +10:00
Peter Hutterer
fbf35e27f3 input: set XKB extension for all new devices, not just xfree86 ones.
Right now, Xephyr and others don't get to use XKB on the slave devices.
Which works given that no-one cares about SDs just yet but event processing
is different if the ProcessInputProc isn't wrapped properly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:49 +10:00
Peter Hutterer
11ed32b62c xfree86: purge SendDragEvents support.
From the documentation:
"This is mainly to allow a touch screen to be used with netscape and other
browsers which do strange things if the mouse moves between button down and
button up."

CLOSED - NOTOURBUG

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:48 +10:00
Peter Hutterer
7defd282be xfree86: remove XI86_CONFIGURED flag.
PreInit returns a status code. Let's use that instead of having it report
Success in some cases but not set the XI86_CONFIGURED flag and thus signal
an init failure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:48 +10:00
Peter Hutterer
97a4acdac2 xfree86: purge some unused defines.
These defines have been write-only for a while now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:48 +10:00
Peter Hutterer
0fb7a5c261 input: Purge Register*Device() functions.
RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to
RegisterOtherDevice() and obsolete.

RegisterOtherDevice() was called for all devices and the two assignments can
simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and
pretend it never happened.

*lalalalala*

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:47 +10:00
Peter Hutterer
67ffbcc14c xfree86: remove superflous assignments.
ActivateGrab and DeactivateGrab are set in AddInputDevice() already.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:47 +10:00
Peter Hutterer
4cd54d9ed9 xfree86: make xf86ActivateDevice static.
No-one but the joystick driver uses it and that one should be using NIDR
instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:47 +10:00
Peter Hutterer
31c71425ac config: expose config_info as an input option.
config_info is the only reliable indicator we have in the server for
duplicate devices (drivers can test for maj/min on fds as well). Don't set
this after the device has been initialized but assume it's important enough
to set during NIDR.

This makes the option "config_info" available to the drivers as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:46 +10:00
Peter Hutterer
de0cc5a72d xfree86: rework driver PreInit API - XInput ABI 12
The main change introduced in this patch is the removal of the
back-and-forth between DDX and the driver.
The DDX now allocates the InputInfoRec and fills it with default values. The
DDX processes common options (and module-specific default options, if
appropriate) before passing the initialised struct to the driver.

The driver may do module-specific initializations and return Success or an
error code in the case of a failure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:46 +10:00
Jesse Adkins
4a12aecac6 xfree86: Document terminate not mapped by default (bug 25083)
Document that terminate is not mapped to Ctrl+Alt+Backspace by default, to help alleviate some confusion.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01 14:44:40 +10:00
Peter Hutterer
3cc5e44224 xfree86: fix compiler warning about implicied decl of DuplicateModule.
../../../../hw/xfree86/common/xf86Xinput.c: In function ‘xf86AllocateInput’:
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: implicit
declaration of function ‘DuplicateModule’
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: nested extern
declaration of ‘DuplicateModule’
../../../../hw/xfree86/common/xf86Xinput.c:722: warning: assignment makes
pointer from integer without a cast

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 14:43:14 +10:00
Matt Turner
08adf41f63 Replace malloc/strlen/strcpy with strdup.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:48 -04:00
Jesse Adkins
ea239112b0 xfree86: Purge parsePrologueVoid.
This was included in the original commit, and then never used.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:43 -04:00
Jesse Adkins
b25fb9fe99 xfree86: Removed unused messages from Configint.h
AUTOREPEAT_MSG, MOVED_TO_FLAGS_MSG, and XLEDS_MSG made obsolete by
 81913a1291 Jul 21 2006 (remove undead files from master)
UNDEFINED_DEVICE_MSG made obsolete by
 6033d8150b Oct 9 2007 (first pass at video driver autoloading)

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:39 -04:00
Jesse Adkins
18b62e0479 xfree86: Fix leaks in OpenConfigFile and OpenConfigDir
[mattst88: fixed whitespace and a missing semicolon]

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:35 -04:00
Jesse Adkins
4f04fd595e xfree86: Simplify xf86Msg{,Verb}
Previously, the functions would call xf86VDrvMsgVerb with a screen of -1
 despite their comments saying they were for "non-driver messages".
They now call LogVMessageVerb, which is what xf86VDrvMsgVerb does anyway
 when it has a screen == -1.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:45 -04:00
Jesse Adkins
f49473abfd xfree86: Remove prototypes for non-existant functions.
This was obsolete from 9a0f25de7c "Static cleanups, dead code deletion." (server 1.3).

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:39 -04:00
Jesse Adkins
747bf5fe80 xfree86: Remove comments about unable to use malloc.
These are leftovers from when X still used Xmalloc and friends for allocation.
Now that those are gone, these comments are just confusing.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:04:25 -04:00
Tiago Vignatti
6546665293 xfree86: vgaarb: fix device decoding interface to send resources type properly
Right now, when there is more than one vide card on the machine, we're
adopting a pessimistic approach and setting all cards to decode VGA legacy
address.

Some cards may want to skip the arbitration and the only way to do so is
through pci_device_vgaarb_decodes. Therefore, send the desired kind of
resource instead force the worst case.

Note that xf86VGAarbiterDeviceDecodes is not being used so far by any
open-source driver. Even so, API break.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2010-08-26 18:17:12 +03:00
Tiago Vignatti
7fbf3e7cf4 xfree86: vgaarb: remove useless macro
This was inherited from RAC and was never used there either.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:59 +03:00
Tiago Vignatti
ad698dd5bc xfree86: vgaarb: remove superfluous and confusing VGAGet_GC and VGAPut_GC
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:33 +03:00
Tiago Vignatti
c0aed4c99b xfree86: vgaarb: change macros by inline functions to ease debug
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-26 18:16:05 +03:00
Chris Wilson
951605b466 edid: Adjust rounding of max_clock
A simple hack to accommodate various EDID who have detailed modes that
exceed the EDID's max pixel clock. The pixel clock is only defined in
units of 10MHz and often appears as the maximum pixel code of the
detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to
include an extra 5MHz prevents the parser from rejecting the detailed
modes.

The kernel uses the same fuzz and by including it in X we can use the
same modes in X as for the console.

Fixes:

  Bug 23833 - X uses different refresh rate to that set by kernel module
  https://bugs.freedesktop.org/show_bug.cgi?id=23833

In the future, we will want to try harder to keep the KMS modes but at
the same time we need to apply the restrictions as specified by the
user's configuration, and need to fill in modes for fullscreen games on
fixed-mode panels.

Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-20 08:55:05 -07:00
Jeremy Huddleston
5d1d9d9ae3 XQuartz: xpr: Bail on errors during unlock and destroy
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
ee7fd8fc58 XQuartz: UpdateScreen at the end of SetRootless
This will ensure that pRoot is unlocked after the miPaintWindow

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
4fc4cab98d XQuartz: Make application switching work better for the no-spaces case
We still have the issue with not raising the frontmost window for the case
when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is
disabled.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
e5bc62a032 XQuartz: Ignore kXquartzToggleFullscreen when rootless
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Alan Coopersmith
b5cf9c5090 Stop checking or calling PtrCtrlProcs
None of them do anything useful now that pointer acceleration is
entirely handled in the server.   (Does not completely nuke yet,
since that would be an API/ABI break.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-13 15:24:51 +10:00
Jesse Adkins
bce12f2956 xfree86: parser: Never use constant strings for driver names (fixes #17438)
When the parser sees the "keyboard" driver, it automatically (and
 silently) replaces it with the constant string "kbd".
Everybody else uses malloc'd memory for the driver name, so input
 device closure assumes it can use free.
Free val.str, so this crash doesn't turn into a memory leak. Whew.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-13 11:43:18 +10:00
Jon TURNEY
fbd0204679 Cygwin/X: Fix glxWinCreateDrawable() for API change
Commit 9de0e31746 changed the signature
of __GLXScreen's createDrawable method.

Update the glxWinCreateDrawable() function in XWin's GLX provider
appropriately.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-10 09:29:39 -07:00
Matt Turner
7e0575baf1 ddc: Fix memory leak in GetEDID_DDC1
Mark argument to DDC_checksum as const too.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-01 22:48:21 -04:00
Jeremy Huddleston
750d4e82a0 XQuartz: xpbproxy: Don't take down the whole server on an IO error
Calls pthread_exit to prevent _XIOError from calling exit()

This fixes http://xquartz.macosforge.org/trac/ticket/421

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-07-29 11:41:32 -07:00