3 Copyright 1993 by Davor Matic
5 Permission to use, copy, modify, distribute, and sell this software
6 and its documentation for any purpose is hereby granted without fee,
7 provided that the above copyright notice appear in all copies and that
8 both that copyright notice and this permission notice appear in
9 supporting documentation. Davor Matic makes no representations about
10 the suitability of this software for any purpose. It is provided "as
11 is" without express or implied warranty.
15 #ifdef HAVE_XNEST_CONFIG_H
16 #include <xnest-config.h>
20 #include <X11/Xproto.h>
21 #include "screenint.h"
25 #include "scrnintstr.h"
27 #include "mipointer.h"
36 DeviceIntPtr xnestPointerDevice
= NULL
;
39 xnestChangePointerControl(DeviceIntPtr pDev
, PtrCtrl
*ctrl
)
41 XChangePointerControl(xnestDisplay
, True
, True
,
42 ctrl
->num
, ctrl
->den
, ctrl
->threshold
);
46 xnestPointerProc(DeviceIntPtr pDev
, int onoff
)
48 CARD8 map
[MAXBUTTONS
];
55 nmap
= XGetPointerMapping(xnestDisplay
, map
, MAXBUTTONS
);
56 for (i
= 0; i
<= nmap
; i
++)
57 map
[i
] = i
; /* buttons are already mapped */
58 InitPointerDeviceStruct(&pDev
->public, map
, nmap
,
60 xnestChangePointerControl
,
61 GetMotionHistorySize(), 2);
64 xnestEventMask
|= XNEST_POINTER_EVENT_MASK
;
65 for (i
= 0; i
< xnestNumScreens
; i
++)
66 XSelectInput(xnestDisplay
, xnestDefaultWindows
[i
], xnestEventMask
);
69 xnestEventMask
&= ~XNEST_POINTER_EVENT_MASK
;
70 for (i
= 0; i
< xnestNumScreens
; i
++)
71 XSelectInput(xnestDisplay
, xnestDefaultWindows
[i
], xnestEventMask
);