Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Trevisan
xserver
Commits
612e8205
Commit
612e8205
authored
Nov 05, 2002
by
Keith Packard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up touch screen hacks for controlling pointer on alternate screen
parent
358d887c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
+20
-15
hw/kdrive/fbdev/fbdev.c
hw/kdrive/fbdev/fbdev.c
+2
-6
hw/kdrive/linux/tslib.c
hw/kdrive/linux/tslib.c
+2
-4
hw/kdrive/src/kdrive.h
hw/kdrive/src/kdrive.h
+11
-1
hw/kdrive/src/kinput.c
hw/kdrive/src/kinput.c
+5
-4
No files found.
hw/kdrive/fbdev/fbdev.c
View file @
612e8205
...
...
@@ -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
:4
6
keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.
31
2002/
10/14 18:01
:4
0
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
;
...
...
hw/kdrive/linux/tslib.c
View file @
612e8205
/*
* $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
(
Ts
Screen
==
TsFbdev
)
{
if
(
KdTsCur
Screen
==
KdTsPhyScreen
)
{
flags
=
KD_BUTTON_1
;
x
=
event
.
x
;
y
=
event
.
y
;
...
...
hw/kdrive/src/kdrive.h
View file @
612e8205
...
...
@@ -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.2
6
2002/10/1
4 18:01:4
0 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.2
7
2002/10/1
8 06:08:1
0 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
*
);
...
...
hw/kdrive/src/kinput.c
View file @
612e8205
...
...
@@ -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.2
7
2002/10/3
0 21
:2
5
:5
3
keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.2
8
2002/10/3
1 18
:2
9
:5
0
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
Ts
Screen
=
pScreen
->
myNum
;
KdTsCur
Screen
=
pScreen
->
myNum
;
#endif
miPointerWarpCursor
(
pScreen
,
x
,
y
);
KdUnblockSigio
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment