summaryrefslogtreecommitdiff
path: root/mi/mieq.c
AgeCommit message (Collapse)AuthorFilesLines
2008-05-20mi: sync declaration and definition of mieqResizeEvents.Peter Hutterer1-1/+1
2008-04-30dix: resize EQ to minimum size to avoid reallocs during SIGIO.Peter Hutterer1-0/+10
When a new device is added, calculate the event size needed if a DCCE event is sent and set the EQ's event size to this minimum. This avoids reallocs when a event is sent (which may happen during a SIGIO).
2008-04-29mi: call the custom event handlers for both MD and SD.Peter Hutterer1-16/+21
2008-04-25Standardise copyright headers for all new files created as part of MPX.Peter Hutterer1-7/+0
2008-04-22Xext: route event through master if required (XTestFakeInput)Peter Hutterer1-1/+1
2008-04-22mi: fix typo in comment.Peter Hutterer1-1/+1
2008-04-08dix: Ensure Proximity events don't kill the server.Magnus Vigerlöf1-1/+2
Add Prox events to the if-clauses with the other events that are usually sent from the input devices. Ensure that the event deliverers won't try to deliver events of type '0' (some extended events doesn't have an equivalent core-type) Small modification by Peter Hutterer. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-14mi: remove RawDeviceEvent's ID changing.Peter Hutterer1-5/+1
2008-01-03Merge branch 'master' into mpxPeter Hutterer1-3/+5
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
2007-12-14Input: Fix proximity events with valuatorsBartosz Fabianowski1-1/+3
Initialise num_events to 1, so we always send a proximity event, and then optionally valuator events. Also make sure mieq can deal with valuator events sent after proximity events.
2007-12-07mi: unify last two ErrorF's in mieq.cPeter Hutterer1-2/+2
2007-12-07mi: change infamous "Tossed event ..." error for something more explanatory.Peter Hutterer1-6/+7
Few whitespace errors fixed. Two ErrorF's prefixed with [mi].
2007-11-19xace: restore the old SaveScreens function and introduce new API, since theEamon Walsh1-1/+1
old version is called from drivers...
2007-11-15mi: don't call SwitchCoreKeyboard, we switch during event processing now.Peter Hutterer1-13/+3
2007-11-13dix: Send MappingNotify when keyboard maps change.Peter Hutterer1-2/+3
If a slave device is attached to a master device, then we need to send a mapping notify to the client. Mapping notify needs to be sent if - different slave device but on same master - different master This gives you funny behaviour with the ClientPointer. When a MappingNotify is sent to the client, the client usually responds with a GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping, regardless of which keyboard sent the last mapping notify request. So depending on the CP setting, your keyboard may change layout in each app...
2007-11-12mi: avoid SIGABRT by setting master_event to NULL.Peter Hutterer1-1/+2
2007-11-09Xi, dix: Add ability to change MD classes + send event when doing so.Peter Hutterer1-3/+4
Each time a different slave device sends through a master, an DeviceClassesChangedEvent is enqueued. When this event is processed, all classes of the matching master device are changed, and the event is sent to the clients. Next time the master is queried, it thus shows the evclasses of the last slave device. The original classes are stored in the devPrivates. TODO: if all slave devices are removed, the master's original classes need to be restored.
2007-11-08mi: change the device id to the master devices' when duplicating the event.Peter Hutterer1-18/+74
Move the event duplication into a CopyGetMasterEvent(), makes the code a bit better to read.
2007-11-07mi: duplicate event before processing it, so master has original valuesPeter Hutterer1-2/+21
Event values may get changed in the event processing stage, so we need to duplicate it to pump different events through for slave and master device.
2007-10-17mi: call processInputProc for master devices after slave event processing.Peter Hutterer1-0/+3
More work is needed to sort out grabs though.
2007-10-02mi: switch core keyboard on XI events, not only on core events.Peter Hutterer1-4/+6
We only get core events through the EQ in exceptional cases, so make sure we actually swap the core keymap for XI events as well. Gives us back the ability to have multiple keyboard layouts simultaneously.
2007-09-28Remove generation of core events, long live XI!Peter Hutterer1-1/+2
Let the drivers only generate XI events and put those into the event queue. When processing events, generate core events as needed. This fixes a number of problems with XKB and the DIX in general. The previous approach was to put core events and XI events as separate events into the event queue. When being processed, the server had no knowledge of them coming from the same device state change. Anything that would then change the state of the device accordingly was in danger of changing it twice, leading to some funny (i.e. not funny at all) results. Emulating core events while processing XI events fixes this, there is only one path that actually changes the device state now. Although we have to be careful when replaying events from synced devices, otherwise we may lose events. Note: XI has precedence over core for passive grabs, but core events are delivered to the client first. This removes the wrapping added in 340911d7243a7f1095d79b5b2dcfa81b145c2474
2007-09-26Wrap core event handling through ProcessOtherEvents.Peter Hutterer1-17/+3
When processing events from the EQ, _always_ call the processInputProc of the matching device. For XI devices, this proc is wrapped in three layers. Core event handling is wrapped by XI event handling, which is wrapped by XKB. A core event now passes through XKB -> XI -> DIX. This gets rid of a sync'd grab problem: with the previous code, core events did disappear during a sync'd device grab on account of mieqProcessInputEvents calling the processInputProc of the VCP/VCK instead of the actual device. This lead to the event being processed as normal instead of being enqueued for later replaying.
2007-08-16xace: add hooks + new access codes: core protocol screensaver requestsEamon Walsh1-2/+2
2007-08-06mieqEnqueue: Don't try to update the time for GenericEvents.Peter Hutterer1-2/+10
Doing so may overwrite the event's length field and cause havoc. Also check if realloc'd memory did actually return valid pointer.
2007-06-27mieqEnqueue: use modulo for queue tail wrapping.Peter Hutterer1-5/+3
This was previously committed by Michael Daenzer, but was lost during a pull.
2007-06-19Merge branch 'master' into mpxPeter Hutterer1-14/+6
Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c
2007-06-19mieqEnqueue: Make local queue tail variables unsigned.Michel Dänzer1-1/+1
So the modulo arithmetic actually works as intended... thanks to Peter Hutterer for pointing out the problem.
2007-06-11mieq queue handling cleanups.Michel Dänzer1-16/+6
In particular, fix handling of wraparounds in mieqEnqueue.
2007-05-02Adjust EQ to support long events.Peter Hutterer1-27/+70
Add RawDeviceEvent (pointers only for now). This commit changes the event queue to use EventLists instead of xEvent arrays. Only EQ is affected, event delivery still uses xEvent* (look for comment in mieqProcessInputEvent). RawDeviceEvents deliver driver information to the client, without clipping or acceleration.
2007-04-26Enable event delivery for multiple heads.Paulo Ricardo Zanoni1-12/+12
Requires moving the spriteTrace into the DeviceIntRec and adjusting a few functions to take in device argument, most notably XYToWindow(). Cursor rendering on the second screen is busted.
2007-04-12Merge branch 'master' into mpxPeter Hutterer1-3/+3
Conflicts: configure.ac dix/events.c hw/xfree86/common/xf86Xinput.c
2007-04-10mieq: Use larger default queue sizeDaniel Stone1-1/+1
Use a default queue size of 512 rather than 256, else Xephyr is too slow without a host cursor, so events get stuck in the queue.
2007-04-09Bug #10560: Code-Cleanup: function declarations () -> (void)Stefan Huehner1-2/+2
X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560> Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
2007-04-02Merge branch 'master' into mpxPeter Hutterer1-0/+24
Conflicts: Xi/closedev.c Xi/exevents.c Xi/extinit.c Xi/listdev.c dix/window.c hw/xfree86/common/xf86Xinput.c include/extinit.h mi/mipointer.c
2007-03-25Clean up DeviceIntPtr, prepare for Server 1.4 ABI. Move sprite-relatedPeter Hutterer1-6/+2
information into a new SpriteInfoRec, remove isMPDev flag.
2007-03-21mieq: Allow event handlers for arbitrary events to be setDaniel Stone1-0/+24
Allow arbitrary events to use mieq by letting custom handlers be set.
2007-02-05xkb: Daniel's patch to stop evdev keyboard segfaults.Peter Hutterer1-8/+0
mi: Remove quickfix from ba547d4f6a2707f51f0d826389d2d418fb62367a
2007-01-28Merge branch 'master'Peter Hutterer1-0/+13
2007-01-12mi: Quick fix to stop segfault on non-core keyboards.Peter Hutterer1-0/+8
2007-01-11mi: remove core pointer special handling. No event has core pointer asPeter Hutterer1-4/+1
device now. dix: zero pSprite memory, stop segfaults on server restart.
2007-01-03Move the code for resetting the DPMS mode in response to input events,Fredrik Höglund1-0/+13
from WaitForSomething to mieqProcessInputEvents. mieqProcessInputEvents already handles resetting the screen saver.
2006-12-18Cleaning up ifdef MPX from remaining files, removing it from configure.ac.Peter Hutterer1-6/+1
Removing building mpx extension from Makefile.am
2006-12-18mi: removing MPX ifdefsPeter Hutterer1-8/+3
global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap fixed: wrong core pointer usage in miSpriteStoreColors dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) bugfix GrabDevice: uninitialized field in grab struct caused segfault xfree86: removing MPX fdefs Xi: removing MPX protocol events
2006-11-28mi: Bugfix: FreeCursor ignores negative refcounts.Peter Hutterer1-1/+1
mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies
2006-11-23mi: closing memory leak, miPointer is freed in miPointerCloseScreenPeter Hutterer1-1/+1
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX adding DeviceIntPtr parameter to ScreenRec's cursor functions. cleanup of miPointer code to use same scheme in each function dix: MPHasCursor() function determines checking whether to invoke cursor rendering. animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies on the core pointer right now. xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on the core pointer right now. rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on the core pointer right now. ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on the core pointer right now.
2006-11-21dix: moved sprite from static to be pointer of type SpritePtrPeter Hutterer1-10/+4
added SpriteRecs for MPX devices changed sprite dependency and added MPX functionality to parts of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, PointerConfinedToScreen) added DeviceIntRec param to GetSpritePosition(). This required some minor changes in ddx, xtest, xkb and xfixes. mi: changed miPointer to pointer instead of static struct.
2006-11-17mi:Peter Hutterer1-0/+12
added miCursorInfoRec to contain info of the MPX cursors. calling miUpdatePointerSprite() from event queue for MPX devices. adding device-specific processing to miPointer*() functions. dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ NOTE: This build will not display cursor images. BUG: The second mouse does to take correct x coordinates.
2006-11-16mieq: EQ processing handles MP devicesPeter Hutterer1-1/+25
global: MPX define added to xorg-server.h.in xfree86/common: small fix to avoid byte overflow
2006-11-16dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents()Peter Hutterer1-0/+6
mieq: avoid merging events from different devices in mieqEnqueue() xfree86/common isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() and xf86PostButtonEvent()