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.old/dist/hw/netbsd/x68k Use Alloc...



details:   https://anonhg.NetBSD.org/xsrc/rev/a0d86f125325
branches:  trunk
changeset: 10497:a0d86f125325
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jul 18 04:37:50 2020 +0000

description:
Use AllocDevicePair() to initialize input devices in InitInput().

This should have been done on the initial X11R7'fied imoprt as
upstream xnest did:
 https://cgit.freedesktop.org/xorg/xserver/commit?id=32ce5c83a504d2cafd2b19ed628b40032ef347b3

Tested and no visible regression on XM6i.

diffstat:

 external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r fc71d6c8779e -r a0d86f125325 external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c
--- a/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c       Sat Jun 27 17:09:59 2020 +0000
+++ b/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kInit.c       Sat Jul 18 04:37:50 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kInit.c,v 1.2 2020/04/10 16:49:36 tsutsui Exp $ */
+/* $NetBSD: x68kInit.c,v 1.3 2020/07/18 04:37:50 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -128,8 +128,14 @@
 void
 InitInput(int argc, char *argv[]) 
 {
-    x68kPointerDevice = AddInputDevice(serverClient, x68kMouseProc, TRUE);
-    x68kKeyboardDevice = AddInputDevice(serverClient, x68kKbdProc, TRUE);
+    int rc;
+
+    rc = AllocDevicePair(serverClient, "x68k",
+                        &x68kPointerDevice, &x68kKeyboardDevice,
+                        x68kMouseProc,x68kKbdProc, FALSE);
+    if (rc != Success)
+       FatalError("Failed to init x68k default input devices.\n");
+
     GetEventList(&x68kEvents);
 
     if ( !mieqInit() )



Home | Main Index | Thread Index | Old Index