xserver-multidpi/dix/enterleave.h
Peter Hutterer b292a7a2d7 dix: updated enter/leave core event model.
As proposed by Owen Taylor [1], the enter-leave event model needs to adjust
the events sent to each window depending on the presence of pointers in a
window, or in a subwindow.

The new model can be summarised as:
- if the pointer moves into or out of a window that has a pointer in a child
  window, the events are modified to appear as if the pointer was moved out of
  or into this child window.
- if the pointer moves into or out of a window that has a pointer in a parent
  window, the events are modified to appear as if the pointer was moved out of
  or into this parent window.

Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to
be split and treated separately.

[1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:46 +10:00

71 lines
2.3 KiB
C

/*
* Copyright © 2008 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Authors: Peter Hutterer
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef ENTERLEAVE_H
#define ENTERLEAVE_H
extern void DoEnterLeaveEvents(
DeviceIntPtr pDev,
WindowPtr fromWin,
WindowPtr toWin,
int mode
);
extern void EnterLeaveEvent(
DeviceIntPtr mouse,
int type,
int mode,
int detail,
WindowPtr pWin,
Window child);
extern WindowPtr CommonAncestor(
WindowPtr a,
WindowPtr b);
extern void CoreEnterLeaveEvent(DeviceIntPtr mouse,
int type,
int mode,
int detail,
WindowPtr pWin,
Window child);
extern void DeviceEnterLeaveEvent(DeviceIntPtr mouse,
int type,
int mode,
int detail,
WindowPtr pWin,
Window child);
extern void EnterWindow(DeviceIntPtr dev,
WindowPtr win,
int mode);
#endif /* _ENTERLEAVE_H_ */