summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-14os: inputthread: Remove unused forward declarationinput-threadFernando Carrijo1-1/+1
This is a disease wich only contributes to namespace pollution.
2010-08-14os: inputthread: Explicitely close the pipes after the input thread is cancelledFernando Carrijo1-0/+5
2010-08-14os: inputthread: Close the input thread with pthread_cancelFernando Carrijo1-11/+8
This is more portable and more manageable than using syscall.
2010-08-14dix: inputthread: Close the input thread before the event queue is deallocatedFernando Carrijo1-4/+4
We don't want the input thread code to have problems with a nonexistent queue.
2010-08-14inputthread: InputThreadReadPipe is a general socket, not a deviceFernando Carrijo2-2/+2
2010-08-06os: inputthread: non-blocking I/O pipe's read end is enoughTiago Vignatti1-4/+4
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>
2010-08-05os: add only once input pipe for main Select()Tiago Vignatti1-2/+5
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-08-05os: don't ignore EAGAIN on both main and input threads select()Tiago Vignatti2-2/+2
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>
2010-08-05os: inputthread: select() cannot return 0 for a NULL timeoutFernando Carrijo1-12/+9
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-08-03os: inputthread: Fix indentation and add comments to WaitForInputFernando Carrijo1-15/+23
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-08-03os: inputthread: read input devices only triggered by selectFernando Carrijo1-5/+5
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>
2010-08-03os: inputthread: Fix off-by-one error in WaitForInputFernando Carrijo1-1/+1
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-08-03os: inputthread: don't get a return value on WaitForInputFernando Carrijo1-2/+2
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>
2010-08-02os: inputthread: delete unused pipe between input and main threadFernando Carrijo1-18/+0
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>
2010-08-02os: inputthread: don't export AddEnabledDeviceThreadedTiago Vignatti1-1/+1
It's just an internal API and Xorg drivers should call xf86AddEnabledDevice to access it. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-08-02os: inputthread: remove the function AdjustThreadSchedulingFernando Carrijo1-38/+0
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>
2010-07-13os: inputthread: logging typoTiago Vignatti1-1/+1
2010-07-13mi: inputthread: Fix link errorFernando Carrijo1-9/+13
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>
2010-07-11xfree86: inputthread: (FIXME)Tiago Vignatti1-0/+21
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-07-11xserver: inputthread: (FIXME)Tiago Vignatti9-1/+130
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-07-11mi: clean up xquartz pthread entry pointsTiago Vignatti1-38/+26
Group all functions inside one chunk only, removing macro conditionals all over the code. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-07-11os: inputthread: the input thread implementationTiago Vignatti1-0/+223
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-07-06Merge remote branch 'whot/for-keith'Keith Packard10-74/+70
2010-07-07dix: purge leftover manual key down bit setting.Peter Hutterer6-29/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-07dix: add aux. functions for button_is_down, set_button_down, set_button_up.Peter Hutterer3-12/+46
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>
2010-07-07dix: use BitIsOn/SetBit/ClearBit macros for set_key_down helpers.Peter Hutterer1-6/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-07Xi: use set_key_up/down instead of manual bit handling.Peter Hutterer1-7/+6
We have the wrappers, use them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-07dix: treat flags as flags, not as value in key_is_down.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-07mi: rename miPointerMoved to miPointerMoveNoEvent.Peter Hutterer1-5/+5
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>
2010-07-07mi: De-duplicate some code in mipointer.cPeter Hutterer1-16/+2
miPointerMoved already has the same code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-07-06Increase advertised RENDER protocol minor version to 11Robert Hooker1-1/+1
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>
2010-07-02miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639)Keith Packard1-6/+0
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>
2010-07-02Delete unused miDbe screen private private datatypeKeith Packard1-16/+0
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>
2010-07-02Update the sprite immediately when moving it with MouseKeysAlan Coopersmith1-0/+6
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>
2010-07-02Add API to update setting of waitForUpdate screen private in miPointerAlan Coopersmith3-8/+25
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-07-01Merge remote branch 'whot/for-keith'Keith Packard6-75/+68
2010-07-01Revert "xkb: merge lockedPtrButtons state from all attached SDs."Keith Packard4-56/+1
Preparing to merge Peter's branch. This reverts commit 6052710670953b43b4fff5d101b727163fcb1187.
2010-07-01Revert "Revert "dix: use the event mask of the grab for TryClientEvents.""Keith Packard1-2/+50
Preparing to merge Peter's branch. This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b.
2010-07-01Cast void* to pointer* to appease some compilers.James Jones1-1/+1
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>
2010-07-02xkb: release XTEST pointer buttons on physical releases. (#28808)Peter Hutterer3-15/+18
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>
2010-07-01Bump to version 1.8.99.904 (1.9 RC4)Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-01xfree86: configure: remove vendor and card name matching rulesTiago Vignatti1-25/+0
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>
2010-07-01xfree86: pci: remove superfluous vendor and card name loggingTiago Vignatti1-12/+1
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>
2010-07-01xkb: emulate PointerKeys events only on the master device.Peter Hutterer1-5/+4
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>
2010-07-01xkb: merge lockedPtrButtons state from all attached SDs.Peter Hutterer4-1/+54
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>
2010-07-01xkb: Mark switch case fallthrough with comment.Peter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-01dix: fix up erroneous error message.Peter Hutterer1-1/+1
(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>
2010-07-01xkb: remove now obsolete comment.Peter Hutterer1-16/+0
Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent call. Whoop. Di. Doo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-30Initialize dev privates before using anyKeith Packard1-1/+3
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>
2010-06-30Xephyr: fix Xv adaptor capability testsJulien Cristau1-5/+10
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>