History log of /xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 62918564 22-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Allocate keyboard and mouse event buffers in the device private structures.

Also simplify GetEvents functions.

# 3ec86d60 22-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Allocate X68kMousePriv dynamically to avoid static buffers.

DEVICE_OFF and DEVICE_CLOSE operations are also adjusted.

# 4ff7d041 22-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Reduce references to x68kKbdPriv and x68kMousePriv for readability.

# 45f60b5b 22-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Refactor X68k input device handling to remove SIGIO based event processing.

The keyboard and pointer input events are now processed directly
using fd event notifications registered via DIX SetNotifyFd(),
instead of the legacy SIGIO-based asynchronous I/O.

# b0c54374 22-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Use consistent name for DeviceIntPtr variables among keyboard and mouse.

# d8389a6e 17-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Initialize DDX pointer valuators consistently with other drivers/servers.

This may not be strictly necessary, since InitValuatorAxisStruct()
for all axes is also called from the DIX InitPointerDeviceStruct()
via InitValuatorClassDeviceStruct() with default values.

However, for future X.Org updates, it is beneficial to keep the
DIX-DDX interface implementation in MouseProc's DEVICE_INIT operation
consistent with the official xf86-input-mouse driver, xquartz DDX server,
and others.

# 1406604b 17-Jun-2025 tsutsui <tsutsui@NetBSD.org>

Properly apply DIX locking to input events in NetBSD-specific DDX servers.

This thread-based DIX locking approach using input_lock() and
input_unlock() has been available since X.Org 1.19.0:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/30ac7567980a1eb79d084a63e0e74e1d9a3af673

All xfree86 DDX implementations have switched to using these new
DIX locks instead of the old OsBlockSIGIO() / OsReleaseSIGIO() methods:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/6a5a4e60373c1386b311b2a8bb666c32d68a9d99

The xquartz DDX (an official X.Org server implementation) also uses
these locks for input events:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/7d6ebf3f4e4d517bb846d15a5deb131da19a267c

This should resolve occasional SIGSEGVs in the Xsun server caused
by NULL pointer dereferences around the event queue handlers
under heavy load.

Should be pulled up to netbsd-10.

# 2aa2a51f 17-Mar-2021 tsutsui <tsutsui@NetBSD.org>

Fixes "FatalError re-entered, aborting" error when Xservers get SIGSEGV.

Handle a new DEVICE_ABORT mode perperly in deviceProc funtions.
Also don't exit via FatalError() on an unknown mode because it looks
upstream assumes DDX deviceProc functions don't treat it fatal:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/9f79e93b6b3416055d08a0e8f9f16d5fd0649e36

# 9c576acf 11-Mar-2021 tsutsui <tsutsui@NetBSD.org>

ErrorF() doesn't append newlines at the end of messages.

# e8a9312a 07-Feb-2021 tsutsui <tsutsui@NetBSD.org>

Add "Emulate3Buttons" support to the X68k Xorg based monolithic server.

Based on "Emulate3Buttons" functions in the xf86-input-mouse driver,
with various refactoring and cleanups:
- rewrite a magic three-dimensional array for a finate state machine
with proper named structures etc.
- separate 3 button emulation functions from other stuff

See my post on port-x68k@ (and tech-x11@) for more details:
https://mail-index.netbsd.org/port-x68k/2021/02/05/msg000074.html

# b83276b4 20-Nov-2020 tsutsui <tsutsui@NetBSD.org>

valuator_mask_zero() is enough for mouse button events.

# 5ca846b1 01-Aug-2020 tsutsui <tsutsui@NetBSD.org>

Replace 'pointer' type with 'void *' to sync with upstream manner.

https://cgit.freedesktop.org/xorg/xserver/commit/?id=60014a4a98ff924ae7f6840781f768c1cc93bbab

# ab290810 01-Aug-2020 tsutsui <tsutsui@NetBSD.org>

TAB/space cleanup.

# 72502d70 18-Jul-2020 tsutsui <tsutsui@NetBSD.org>

Update for removal of AddEnabledDevice and RemoveEnabledDevice.

Use the NotifyFd API instead as per upstream commits:
https://cgit.freedesktop.org/xorg/xserver/commit/?id=55c2e1a3aa587c58a74066724e11e30b3df267b8
https://cgit.freedesktop.org/xorg/xserver/commit/?id=be5a513fee6cbf29ef7570e57eb0436d70fbd88c
https://cgit.freedesktop.org/xorg/xserver/commit/?id=60a91031d13e4d29c383087120e318f6b528b6e5
https://cgit.freedesktop.org/xorg/xserver/commit/?id=7def2fea30060d47780dc1eedc91fada5ae1934f

# 80c54d45 10-Apr-2020 tsutsui <tsutsui@NetBSD.org>

Remove clause 3 and 4 from X68k server files written by Yasushi Yamasaki.

I've finally contacted with Yamasaki-san and he kindly answered
"no objection to change them to 2 clause license" in private mail.
Diffs to be committed have also been confirmed by him.
We appreciate all his contribution to early NetBSD/x68k.

# bddeb3e5 11-Sep-2016 tsutsui <tsutsui@NetBSD.org>

Pull more changes from Xnest to adapt X68k to Xorg server 1.18.

- use QueueKeyboardEvents() and QueuePointerEvents() which are provided
by dix/getevents.c, instead of raw mieqEnqueue() with uninitialized
local InternalEvent
- remove now actually unused local InternalEvent
- explicitly call mieqFini() in DDX CloseInput()

Confirmed working on XM6i, and "please commit" from mrg@.

# 909daefd 30-Aug-2016 mrg <mrg@NetBSD.org>

port to xorg-server 1.18. builds and may work, but not tested.

# ba64b02e 01-Mar-2014 tsutsui <tsutsui@NetBSD.org>

Port the ancient Xsun based monolithic MD X68k server to X11R7, like Xnest.

Most diffs (API changes from xfree to xorg and some WARNSfy)
are mechanical. Confirmed working on X68030 and XM6i.

See my post on port-x68k@ for details:
http://mail-index.netbsd.org/port-x68k/2014/02/27/msg000043.html