Age | Commit message (Collapse) | Author | Files | Lines |
|
This is a disease wich only contributes to namespace pollution.
|
|
|
|
This is more portable and more manageable than using syscall.
|
|
We don't want the input thread code to have problems with a nonexistent queue.
|
|
|
|
Although we're not expecting to see the case of the pipe become full, we
prefer to block write if this happens.
Also, document better a bit the reason of read end be non-blocking.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Although select man page does not mention it failing with EAGAIN, in practice
it seems to be returning this on Linux systems:
http://www.google.com/search?q=%22WaitForSomething():+select:+errno%3D11%22
Yeah, that's very very ugly.
Anyway, for now let's keep logging when this case happens, with the hope that
the input-thread will solve the issue - the cause might be related with SIGIO.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
s/InputDevices/ReadyInputDevices/
After WaitForInput awakens from Select, ReadyInputDevices is the only
trustable source of information about input devices which can be _read_
without blocking. Use it instead of InputThreadFd. The latter encompasses all
devices serviced by the input thread; be they ready or not.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Since WaitForInput exists for the sole purpose of being used as a thread
routine, we can afford to declare its return type as void*, which is the
most natural choice considering pthreads usage.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
InputReadPipe and InputWritePipe are deadcode. Similar mechanism is being
employed already in CreateWellKnownSockets.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
It's just an internal API and Xorg drivers should call xf86AddEnabledDevice to
access it.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
We may want to use this later but git can easily bring back for us.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
|
|
Macro preprocessing can get confusing sometimes. This patch corrects a link
error by striving for a less elegant albeit simpler solution for the
conditional compilation of XQUARTZ and INPUT_THREAD-related code.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Group all functions inside one chunk only, removing macro conditionals all
over the code.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Same as the matching key functions. Buttons, like keys, can have two states
for down/up - one posted, one processed. Posted is set during event
generation (usually in the signal handler). Processed is set during event
processing when the event queue is emptied and events are being delivered to
the client.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
We have the wrappers, use them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Having miPointerMove and miPointerMoved is confusing, especially since both
do the same thing bar the event delivery. Also, miPointerMove calls
miPointerMoved which indicates some confusion in the temporal alignment of
cause and effect.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
miPointerMoved already has the same code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Support for the blend mode operators was added in
0ce42adbf4cff9e7f049d9fc79d588ece5936177
and the requirement was bumped but when things were split off into
include/protocol-versions.h it defined it to 10. render uses
the lower of the client and server advertised versions so it's not
using the new blend mode operators.
Signed-off-by: Robert Hooker <sarvatt@ubuntu.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
miDbeInit pre-allocates space in each DBE window private private for a
MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the
pre-allocated space correctly (simply fetching it instead of
allocating a new piece of memory). However, it then called
dixSetPrivate anyways, which isn't necessary, and (in the new
dixPrivate world) causes an assert failure.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net>
|
|
MiDbeScreenPrivPrivRec is not used in the server. Remove it, along
with the MI_DBE_SCREEN_PRIV_PRIV macro that tried to use it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Magnus.Kessler <Magnus.Kessler@gmx.net>
|
|
Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable
and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856
Ensures waitForUpdate is False before calling SetCursorPosition.
Normally waitForUpdate is False when SilkenMouse is active, True
when it's not. When it's True, the mouse cursor position on
screen is not updated immediately.
This is more critical on Solaris, since we disabled SigIO, thus in turn
disable SilkenMouse, due to the SSE2 vs. signal handler issues described in
Sun bugs 6849925, 6859428, and 6879897.
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>
|
|
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>
|
|
|
|
Preparing to merge Peter's branch.
This reverts commit 6052710670953b43b4fff5d101b727163fcb1187.
|
|
Preparing to merge Peter's branch.
This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b.
|
|
When this privates.h is included in C++ builds, the compiler
complains about implicitly casting void* to void**. This small
patch fixes that up.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
If a button release event is posted for the MD pointer, post a release event
through the matching XTEST device. This way, a client who posts a button
press through the XTEST extension cannot inadvertedly lock the button.
This behaviour is required for historical reasons, until server 1.7 the core
pointer would release a button press on physical events, regardless of the
XTEST state. Clients seem to rely on this behaviour, causing seemingly stuck
grabs.
The merged behaviour is kept for multiple keyboard PointerKey events, if two
physical keyboards hold the button down as a result of PointerKey actions,
the button is not released until the last keyboard releases the button.
X.Org Bug 28808 <http://bugs.freedesktop.org/show_bug.cgi?id=28808>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Although vendor and board naming are used to create the configure file, the
server doesn't actually use it when fetching such file and probing devices.
Reported-by: Richard Barnette <jrbarnette@chromium.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
X server suffers in startup time when relying on the pciaccess's linear search
to fetch vendor and video device name from PCI ID file (when existent). Such
names are only used to write the log, which may be superfluous. This
information often is provided by the drivers or likewise users can get the it
using external tools like lspci or scanpci.
This patch remove the references of those functions from X start up.
Reported-by: Richard Barnette <jrbarnette@chromium.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This patch replicates the behaviour for button events. Only generate a
PointerKeys motion event on the master device, not on the slave device.
Fixes the current issue of PointerKey motion events generating key events as
well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Problem:
lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button
press. Unconditionally clearing the bits may cause stuck buttons in this
sequence of events:
1. type Shift + NumLock to enable PointerKeys
2. type 0/Ins on keypad to emulate Button 1 press
→ button1 press event to client
3. press and release button 1 on physical mouse
→ button1 release event to client
Button 1 on the MD is now stuck and cannot be released.
Cause:
XKB PointerKeys button events are posted through the XTEST pointer device.
Once a press is generated, the XTEST device's button is down. The DIX merges
the button state of all attached SDs, hence the MD will have a button down
while the XTEST device has a button down.
PointerKey button events are only generated on the master device to avoid
duplicate events (see XkbFakeDeviceButton()). If the MD has the
lockedPtrButtons bit cleared by a release event on a physical device, no
such event is generated when a keyboard device triggers the PointerKey
ButtonRelease trigger. Since the event - if generated - is posted through
the XTEST pointer device, lack of a generated ButtonRelease event on the
XTEST pointer device means the button is never released, resulting in the
stuck button observed above.
Solution:
This patch merges the MD's lockedPtrButtons with the one of all attached
slave devices on release events. Thus, as long as one attached keyboard has
a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey
button is released on all keyboards, the matching release event is emulated
from the MD through the XTEST pointer device, thus also releasing the button
in the DIX.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
(WW) Device 'device name' has 36 axes, only using first 36.
does seem a bit silly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent
call. Whoop. Di. Doo.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Initializing the dev privates code after allocating the server client
dev privates would cause the memory leak check to fire at server
startup or reset.
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|