Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/sun Handle restoring keyb...
details: https://anonhg.NetBSD.org/xsrc/rev/c20188ae2974
branches: trunk
changeset: 10810:c20188ae2974
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Oct 15 17:42:04 2021 +0000
description:
Handle restoring keyboard state via AbortDevices() rather than AbortDDX().
Tested on 3/60. Note AbortDevices() and DEVICE_ABORT in deviceProc
functions were introduced after Xorg 1.14.0:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/9f79e93b6b3416055d08a0e8f9f16d5fd0649e36
diffstat:
external/mit/xorg-server/dist/hw/sun/sunIo.c | 5 -----
external/mit/xorg-server/dist/hw/sun/sunKbd.c | 9 +++++++--
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r ff30f94702eb -r c20188ae2974 external/mit/xorg-server/dist/hw/sun/sunIo.c
--- a/external/mit/xorg-server/dist/hw/sun/sunIo.c Fri Oct 08 23:30:17 2021 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunIo.c Fri Oct 15 17:42:04 2021 +0000
@@ -163,17 +163,12 @@
{
int i;
ScreenPtr pScreen;
- DevicePtr devPtr;
#ifdef SVR4
(void) OsSignal (SIGPOLL, SIG_IGN);
#else
(void) OsSignal (SIGIO, SIG_IGN);
#endif
- if (sunKeyboardDevice) {
- devPtr = &sunKeyboardDevice->public;
- (void) sunChangeKbdTranslation (((sunKbdPrivPtr)(devPtr->devicePrivate))->fd, FALSE);
- }
#if defined(SVR4) || defined(CSRG_BASED)
sunNonBlockConsoleOff ();
#else
diff -r ff30f94702eb -r c20188ae2974 external/mit/xorg-server/dist/hw/sun/sunKbd.c
--- a/external/mit/xorg-server/dist/hw/sun/sunKbd.c Fri Oct 08 23:30:17 2021 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunKbd.c Fri Oct 15 17:42:04 2021 +0000
@@ -669,7 +669,7 @@
* Set the keyboard into "direct" mode and turn on
* event translation.
*/
- if (sunChangeKbdTranslation(pPriv->fd,TRUE) == -1)
+ if (sunChangeKbdTranslation(pPriv->fd, TRUE) == -1)
FatalError("Can't set keyboard translation\n");
SetNotifyFd(pPriv->fd, sunKbdHandlerNotify, X_NOTIFY_READ, NULL);
pKeyboard->on = TRUE;
@@ -687,13 +687,18 @@
/*
* Restore original keyboard directness and translation.
*/
- if (sunChangeKbdTranslation(pPriv->fd,FALSE) == -1)
+ if (sunChangeKbdTranslation(pPriv->fd, FALSE) == -1)
FatalError("Can't reset keyboard translation\n");
RemoveNotifyFd(pPriv->fd);
pKeyboard->on = FALSE;
break;
case DEVICE_ABORT:
+ /*
+ * Restore original keyboard directness and translation.
+ */
+ pPriv = (sunKbdPrivPtr)pKeyboard->devicePrivate;
+ (void)sunChangeKbdTranslation(pPriv->fd, FALSE);
break;
}
return Success;
Home |
Main Index |
Thread Index |
Old Index