This commit also gets rid of the focusinout array in the WindowRec, ditching
it in favour of a local array that keeps the current focus window for each
device.
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit eb2d7b3d700952ba88c77deacf687b251300e660)
Conflicts:
dix/events.c
include/input.h
Signed-off-by: Keith Packard <email address hidden>
Instead of keeping a flag on each window for the devices that are in this
window, keep a local array that holds the current pointer window for each
device. Benefit: searching for the first descendant of a pointer is a simple
run through the array.
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit 38b28dcadd0990cb43f50db4300eebb8f044db96)
The old model was implemented based on a misunderstanding of NotifyVirtual and
NotifyNonlinearVirtual events. It became complicated and was broken in some
places [1]. This patch wipes this model completely.
A much simplified implementation is provided instead. Rather than a top-down
approach ("we have a tree of windows, which ones need to get which event")
this one uses a step-by-step approach. For each window W between A and B
determine the pointer window P as perceived by this window and determine the
event type based on this information. This is in-line with the model described
by Owen Taylor [2].
xfree86: don't restore the TTY mode if we didn't initialize it ourselves
Restoring it unconditionally means we restore to whatever tty_mode has as
default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw
mode if allowEmptyInput is off.
Signed-off-by: Peter Hutterer <email address hidden>
Signed-off-by: Adam Jackson <email address hidden>
Signed-off-by: Julien Cristau <email address hidden>
(cherry picked from commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac)
xfree86: If an input device failed to activate, return immediately.
Devices are only activated once - right after they've been added to the
server. If a device failes activation, it's dead. There's no reason to
continue. Return the error code from ActivateDevice() without setting up
sprite information or even sending a event to the client.
Then - in the DDX - just remove the device again.
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit 27011254c4de4e573a0851bf46892fb488db6522)