Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Rauch
xserver
Commits
fae164a4
Commit
fae164a4
authored
Oct 06, 2000
by
Keith Packard
Browse files
kdrive: ignore mouse/keyboard fds in WakeupHandler while switched away
parent
b814019b
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw/kdrive/src/kinput.c
View file @
fae164a4
...
...
@@ -1323,30 +1323,34 @@ KdBlockHandler (int screen,
void
KdWakeupHandler
(
int
screen
,
pointer
data
,
unsigned
long
result
,
unsigned
long
l
result
,
pointer
readmask
)
{
int
result
=
(
int
)
lresult
;
fd_set
*
pReadmask
=
(
fd_set
*
)
readmask
;
if
(
kd
MouseFd
>=
0
&&
FD_ISSET
(
kdMouseFd
,
pReadmask
)
)
if
(
kd
InputEnabled
&&
result
>
0
)
{
KdBlockSigio
();
(
*
kdMouseFuncs
->
Read
)
(
kdMouseFd
);
KdUnblockSigio
();
}
if
(
kdMouseFd
>=
0
&&
FD_ISSET
(
kdMouseFd
,
pReadmask
))
{
KdBlockSigio
();
(
*
kdMouseFuncs
->
Read
)
(
kdMouseFd
);
KdUnblockSigio
();
}
#ifdef TOUCHSCREEN
if
(
kdTsFd
>=
0
&&
FD_ISSET
(
kdTsFd
,
pReadmask
))
{
KdBlockSigio
();
(
*
kdTsFuncs
->
Read
)
(
kdTsFd
);
KdUnblockSigio
();
}
if
(
kdTsFd
>=
0
&&
FD_ISSET
(
kdTsFd
,
pReadmask
))
{
KdBlockSigio
();
(
*
kdTsFuncs
->
Read
)
(
kdTsFd
);
KdUnblockSigio
();
}
#endif
if
(
kdKeyboardFd
>=
0
&&
FD_ISSET
(
kdKeyboardFd
,
pReadmask
))
{
KdBlockSigio
();
(
*
kdKeyboardFuncs
->
Read
)
(
kdKeyboardFd
);
KdUnblockSigio
();
if
(
kdKeyboardFd
>=
0
&&
FD_ISSET
(
kdKeyboardFd
,
pReadmask
))
{
KdBlockSigio
();
(
*
kdKeyboardFuncs
->
Read
)
(
kdKeyboardFd
);
KdUnblockSigio
();
}
}
if
(
kdTimeoutPending
)
{
...
...
@@ -1370,7 +1374,7 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
if
(
kdDisableZaphod
||
screenInfo
.
numScreens
<=
1
)
return
FALSE
;
if
(
*
x
<
0
)
if
(
*
x
<
0
||
*
y
<
0
)
{
n
=
pScreen
->
myNum
-
1
;
if
(
n
<
0
)
...
...
@@ -1380,7 +1384,7 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
*
ppScreen
=
pScreen
;
return
TRUE
;
}
else
if
(
*
x
>=
pScreen
->
width
)
else
if
(
*
x
>=
pScreen
->
width
||
*
y
>=
pScreen
->
height
)
{
n
=
pScreen
->
myNum
+
1
;
if
(
n
>=
screenInfo
.
numScreens
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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