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
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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"
|
#include "fbdev.h"
|
||||||
|
|
||||||
|
@ -581,10 +581,6 @@ fbdevCreateColormap (ColormapPtr pmap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOUCHSCREEN
|
|
||||||
int TsFbdev = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
fbdevInitScreen (ScreenPtr pScreen)
|
fbdevInitScreen (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -595,7 +591,7 @@ fbdevInitScreen (ScreenPtr pScreen)
|
||||||
ShadowWindowProc window;
|
ShadowWindowProc window;
|
||||||
|
|
||||||
#ifdef TOUCHSCREEN
|
#ifdef TOUCHSCREEN
|
||||||
TsFbdev = pScreen->myNum;
|
KdTsPhyScreen = pScreen->myNum;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pScreen->CreateColormap = fbdevCreateColormap;
|
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
|
* TSLIB based touchscreen driver for TinyX
|
||||||
* Derived from ts.c by Keith Packard
|
* Derived from ts.c by Keith Packard
|
||||||
* Derived from ps2.c by Jim Gettys
|
* Derived from ps2.c by Jim Gettys
|
||||||
|
@ -57,8 +57,6 @@
|
||||||
#include <tslib.h>
|
#include <tslib.h>
|
||||||
|
|
||||||
static long lastx = 0, lasty = 0;
|
static long lastx = 0, lasty = 0;
|
||||||
int TsScreen;
|
|
||||||
extern int TsFbdev;
|
|
||||||
static struct tsdev *tsDev = NULL;
|
static struct tsdev *tsDev = NULL;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -84,7 +82,7 @@ TsRead (int tsPort, void *closure)
|
||||||
* touch screen, if it is we send absolute coordinates. If not,
|
* 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.
|
* then we send delta's so that we can track the entire vga screen.
|
||||||
*/
|
*/
|
||||||
if (TsScreen == TsFbdev) {
|
if (KdTsCurScreen == KdTsPhyScreen) {
|
||||||
flags = KD_BUTTON_1;
|
flags = KD_BUTTON_1;
|
||||||
x = event.x;
|
x = event.x;
|
||||||
y = event.y;
|
y = event.y;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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 <stdio.h>
|
||||||
#include "X.h"
|
#include "X.h"
|
||||||
|
@ -208,6 +208,16 @@ typedef struct _KdMouseInfo {
|
||||||
|
|
||||||
extern KdMouseInfo *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);
|
KdMouseInfo *KdMouseInfoAdd (void);
|
||||||
void KdParseMouse (char *);
|
void KdParseMouse (char *);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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 "kdrive.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
@ -325,7 +325,7 @@ KdMouseProc(DeviceIntPtr pDevice, int onoff)
|
||||||
if (kdMouseFuncs)
|
if (kdMouseFuncs)
|
||||||
(*kdMouseFuncs->Fini) ();
|
(*kdMouseFuncs->Fini) ();
|
||||||
#ifdef TOUCHSCREEN
|
#ifdef TOUCHSCREEN
|
||||||
if (kdTsFuncs >= 0)
|
if (kdTsFuncs)
|
||||||
(*kdTsFuncs->Fini) ();
|
(*kdTsFuncs->Fini) ();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1577,7 +1577,8 @@ KdCrossScreen(ScreenPtr pScreen, Bool entering)
|
||||||
|
|
||||||
#ifdef TOUCHSCREEN
|
#ifdef TOUCHSCREEN
|
||||||
/* HACK! */
|
/* HACK! */
|
||||||
extern int TsScreen;
|
int KdTsCurScreen; /* current event screen */
|
||||||
|
int KdTsPhyScreen = -1; /* screen associated with touch screen */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1585,7 +1586,7 @@ KdWarpCursor (ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
KdBlockSigio ();
|
KdBlockSigio ();
|
||||||
#ifdef TOUCHSCREEN
|
#ifdef TOUCHSCREEN
|
||||||
TsScreen = pScreen->myNum;
|
KdTsCurScreen = pScreen->myNum;
|
||||||
#endif
|
#endif
|
||||||
miPointerWarpCursor (pScreen, x, y);
|
miPointerWarpCursor (pScreen, x, y);
|
||||||
KdUnblockSigio ();
|
KdUnblockSigio ();
|
||||||
|
|
Loading…
Reference in New Issue