Clean up touch screen hacks for controlling pointer on alternate screen
This commit is contained in:
parent
358d887cbe
commit
612e82053d
|
@ -21,7 +21,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.29 2002/09/29 23:39:46 keithp Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.31 2002/10/14 18:01:40 keithp Exp $ */
|
||||
|
||||
#include "fbdev.h"
|
||||
|
||||
|
@ -581,10 +581,6 @@ fbdevCreateColormap (ColormapPtr pmap)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef TOUCHSCREEN
|
||||
int TsFbdev = -1;
|
||||
#endif
|
||||
|
||||
Bool
|
||||
fbdevInitScreen (ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -595,7 +591,7 @@ fbdevInitScreen (ScreenPtr pScreen)
|
|||
ShadowWindowProc window;
|
||||
|
||||
#ifdef TOUCHSCREEN
|
||||
TsFbdev = pScreen->myNum;
|
||||
KdTsPhyScreen = pScreen->myNum;
|
||||
#endif
|
||||
|
||||
pScreen->CreateColormap = fbdevCreateColormap;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86$
|
||||
* $XFree86: xc/programs/Xserver/hw/kdrive/linux/tslib.c,v 1.1 2002/11/01 22:27:49 keithp Exp $
|
||||
* TSLIB based touchscreen driver for TinyX
|
||||
* Derived from ts.c by Keith Packard
|
||||
* Derived from ps2.c by Jim Gettys
|
||||
|
@ -57,8 +57,6 @@
|
|||
#include <tslib.h>
|
||||
|
||||
static long lastx = 0, lasty = 0;
|
||||
int TsScreen;
|
||||
extern int TsFbdev;
|
||||
static struct tsdev *tsDev = NULL;
|
||||
|
||||
void
|
||||
|
@ -84,7 +82,7 @@ TsRead (int tsPort, void *closure)
|
|||
* touch screen, if it is we send absolute coordinates. If not,
|
||||
* then we send delta's so that we can track the entire vga screen.
|
||||
*/
|
||||
if (TsScreen == TsFbdev) {
|
||||
if (KdTsCurScreen == KdTsPhyScreen) {
|
||||
flags = KD_BUTTON_1;
|
||||
x = event.x;
|
||||
y = event.y;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.26 2002/10/14 18:01:40 keithp Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.27 2002/10/18 06:08:10 keithp Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "X.h"
|
||||
|
@ -208,6 +208,16 @@ typedef struct _KdMouseInfo {
|
|||
|
||||
extern KdMouseInfo *kdMouseInfo;
|
||||
|
||||
#ifdef TOUCHSCREEN
|
||||
/*
|
||||
* HACK! Send absolute events when touch screen is current,
|
||||
* else send relative events. Used to drive pointers on
|
||||
* alternate screens with the touch screen
|
||||
*/
|
||||
extern int KdTsCurScreen;
|
||||
extern int KdTsPhyScreen;
|
||||
#endif
|
||||
|
||||
KdMouseInfo *KdMouseInfoAdd (void);
|
||||
void KdParseMouse (char *);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.27 2002/10/30 21:25:53 keithp Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.28 2002/10/31 18:29:50 keithp Exp $ */
|
||||
|
||||
#include "kdrive.h"
|
||||
#include "inputstr.h"
|
||||
|
@ -325,7 +325,7 @@ KdMouseProc(DeviceIntPtr pDevice, int onoff)
|
|||
if (kdMouseFuncs)
|
||||
(*kdMouseFuncs->Fini) ();
|
||||
#ifdef TOUCHSCREEN
|
||||
if (kdTsFuncs >= 0)
|
||||
if (kdTsFuncs)
|
||||
(*kdTsFuncs->Fini) ();
|
||||
#endif
|
||||
}
|
||||
|
@ -1577,7 +1577,8 @@ KdCrossScreen(ScreenPtr pScreen, Bool entering)
|
|||
|
||||
#ifdef TOUCHSCREEN
|
||||
/* HACK! */
|
||||
extern int TsScreen;
|
||||
int KdTsCurScreen; /* current event screen */
|
||||
int KdTsPhyScreen = -1; /* screen associated with touch screen */
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -1585,7 +1586,7 @@ KdWarpCursor (ScreenPtr pScreen, int x, int y)
|
|||
{
|
||||
KdBlockSigio ();
|
||||
#ifdef TOUCHSCREEN
|
||||
TsScreen = pScreen->myNum;
|
||||
KdTsCurScreen = pScreen->myNum;
|
||||
#endif
|
||||
miPointerWarpCursor (pScreen, x, y);
|
||||
KdUnblockSigio ();
|
||||
|
|
Loading…
Reference in New Issue
Block a user