Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
4725d6b0db
|
@ -1360,15 +1360,6 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
|
||||||
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
|
||||||
{
|
|
||||||
/* This is an API-preserving noop. Instructions: Kill when no more drivers
|
|
||||||
* call it. The infrastructure behind hasn't really been used, so any calls
|
|
||||||
* are likely just a declaration that the device is absolute. */
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,6 +112,7 @@ Equipment Corporation.
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
#include "inpututils.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
|
|
||||||
|
@ -2195,7 +2196,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
*/
|
*/
|
||||||
if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
|
if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
|
||||||
/* grab activated */;
|
/* grab activated */;
|
||||||
else if ((type == MotionNotify))
|
else if (type == MotionNotify)
|
||||||
pDev->valuator->motionHintWindow = pWin;
|
pDev->valuator->motionHintWindow = pWin;
|
||||||
else if (type == DeviceMotionNotify || type == DeviceButtonPress)
|
else if (type == DeviceMotionNotify || type == DeviceButtonPress)
|
||||||
CheckDeviceGrabAndHintWindow (pWin, type,
|
CheckDeviceGrabAndHintWindow (pWin, type,
|
||||||
|
@ -2832,7 +2833,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
|
||||||
WindowPtr prevSpriteWin, newSpriteWin;
|
WindowPtr prevSpriteWin, newSpriteWin;
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
verify_internal_event(ev);
|
verify_internal_event((InternalEvent *)ev);
|
||||||
|
|
||||||
prevSpriteWin = pSprite->win;
|
prevSpriteWin = pSprite->win;
|
||||||
|
|
||||||
|
@ -5906,7 +5907,7 @@ PickPointer(ClientPtr client)
|
||||||
|
|
||||||
if (!client->clientPtr)
|
if (!client->clientPtr)
|
||||||
{
|
{
|
||||||
DeviceIntPtr it = inputInfo.devices;
|
it = inputInfo.devices;
|
||||||
while (it)
|
while (it)
|
||||||
{
|
{
|
||||||
if (IsMaster(it) && it->spriteInfo->spriteOwner)
|
if (IsMaster(it) && it->spriteInfo->spriteOwner)
|
||||||
|
|
|
@ -574,7 +574,7 @@ void verify_internal_event(const InternalEvent *ev)
|
||||||
|
|
||||||
for (i = 0; i < sizeof(xEvent); i++, data++)
|
for (i = 0; i < sizeof(xEvent); i++, data++)
|
||||||
{
|
{
|
||||||
ErrorF("%02hx ", *data);
|
ErrorF("%02hhx ", *data);
|
||||||
|
|
||||||
if ((i % 8) == 7)
|
if ((i % 8) == 7)
|
||||||
ErrorF("\n");
|
ErrorF("\n");
|
||||||
|
|
|
@ -52,6 +52,7 @@ Bool ephyrNoDRI=FALSE ;
|
||||||
Bool ephyrNoXV=FALSE ;
|
Bool ephyrNoXV=FALSE ;
|
||||||
|
|
||||||
static int mouseState = 0;
|
static int mouseState = 0;
|
||||||
|
static Rotation ephyrRandr = RR_Rotate_0;
|
||||||
|
|
||||||
typedef struct _EphyrInputPrivate {
|
typedef struct _EphyrInputPrivate {
|
||||||
Bool enabled;
|
Bool enabled;
|
||||||
|
@ -249,7 +250,11 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
|
||||||
EPHYR_LOG("screen->width: %d, screen->height: %d index=%d",
|
EPHYR_LOG("screen->width: %d, screen->height: %d index=%d",
|
||||||
screen->width, screen->height, screen->mynum);
|
screen->width, screen->height, screen->mynum);
|
||||||
|
|
||||||
KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
|
/*
|
||||||
|
* Use the rotation last applied to ourselves (in the Xephyr case the fb
|
||||||
|
* coordinate system moves independently of the pointer coordiante system).
|
||||||
|
*/
|
||||||
|
KdComputePointerMatrix (&m, ephyrRandr, screen->width, screen->height);
|
||||||
KdSetPointerMatrix (&m);
|
KdSetPointerMatrix (&m);
|
||||||
|
|
||||||
priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
|
priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
|
||||||
|
@ -530,7 +535,15 @@ ephyrRandRSetConfig (ScreenPtr pScreen,
|
||||||
* Set new configuration
|
* Set new configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrpriv->randr = KdAddRotation (screen->randr, randr);
|
/*
|
||||||
|
* We need to store the rotation value for pointer coords transformation;
|
||||||
|
* though initially the pointer and fb rotation are identical, when we map
|
||||||
|
* the fb, the screen will be reinitialized and return into an unrotated
|
||||||
|
* state (presumably the HW is taking care of the rotation of the fb), but the
|
||||||
|
* pointer still needs to be transformed.
|
||||||
|
*/
|
||||||
|
ephyrRandr = KdAddRotation (screen->randr, randr);
|
||||||
|
scrpriv->randr = ephyrRandr;
|
||||||
|
|
||||||
ephyrUnmapFramebuffer (screen);
|
ephyrUnmapFramebuffer (screen);
|
||||||
|
|
||||||
|
@ -1058,6 +1071,14 @@ MouseInit (KdPointerInfo *pi)
|
||||||
pi->nButtons = 32;
|
pi->nButtons = 32;
|
||||||
free(pi->name);
|
free(pi->name);
|
||||||
pi->name = strdup("Xephyr virtual mouse");
|
pi->name = strdup("Xephyr virtual mouse");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Must transform pointer coords since the pointer position
|
||||||
|
* relative to the Xephyr window is controlled by the host server and
|
||||||
|
* remains constant regardless of any rotation applied to the Xephyr screen.
|
||||||
|
*/
|
||||||
|
pi->transformCoordinates = TRUE;
|
||||||
|
|
||||||
ephyrMouse = pi;
|
ephyrMouse = pi;
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,13 +358,18 @@ ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
|
miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
|
||||||
ephyrRealizeCursor,
|
ephyrRealizeCursor,
|
||||||
ephyrUnrealizeCursor,
|
ephyrUnrealizeCursor,
|
||||||
ephyrSetCursor,
|
ephyrSetCursor,
|
||||||
ephyrMoveCursor,
|
ephyrMoveCursor,
|
||||||
ephyrDeviceCursorInitialize,
|
ephyrDeviceCursorInitialize,
|
||||||
NULL
|
ephyrDeviceCursorCleanup
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(11, 0)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(11, 0)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(12, 2)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(13, 0)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
||||||
|
|
||||||
|
|
|
@ -469,6 +469,20 @@ match_path_pattern(const char *attr, const char *pattern)
|
||||||
#define match_path_pattern match_substring
|
#define match_path_pattern match_substring
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If no Layout section is found, xf86ServerLayout.id becomes "(implicit)"
|
||||||
|
* It is convenient that "" in patterns means "no explicit layout"
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
match_string_implicit(const char *attr, const char *pattern)
|
||||||
|
{
|
||||||
|
if (strlen(pattern)) {
|
||||||
|
return strcmp(attr, pattern);
|
||||||
|
} else {
|
||||||
|
return strcmp(attr,"(implicit)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Match an attribute against a list of NULL terminated arrays of patterns.
|
* Match an attribute against a list of NULL terminated arrays of patterns.
|
||||||
* If a pattern in each list entry is matched, return TRUE.
|
* If a pattern in each list entry is matched, return TRUE.
|
||||||
|
@ -564,6 +578,13 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* MatchLayout string */
|
||||||
|
if (!list_is_empty(&iclass->match_layout)) {
|
||||||
|
if (!MatchAttrToken(xf86ConfigLayout.id,
|
||||||
|
&iclass->match_layout, match_string_implicit))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* MatchIs* booleans */
|
/* MatchIs* booleans */
|
||||||
if (iclass->is_keyboard.set &&
|
if (iclass->is_keyboard.set &&
|
||||||
iclass->is_keyboard.val != !!(attrs->flags & ATTR_KEYBOARD))
|
iclass->is_keyboard.val != !!(attrs->flags & ATTR_KEYBOARD))
|
||||||
|
|
|
@ -1140,6 +1140,16 @@ matches the
|
||||||
pattern. A match is found if at least one of the tags given in
|
pattern. A match is found if at least one of the tags given in
|
||||||
.RI \*q matchtag \*q
|
.RI \*q matchtag \*q
|
||||||
matches at least one of the tags assigned by the backend.
|
matches at least one of the tags assigned by the backend.
|
||||||
|
.TP 7
|
||||||
|
.BI "MatchLayout \*q" matchlayout \*q
|
||||||
|
Check the case-sensitive string
|
||||||
|
.RI \*q matchlayout \*q
|
||||||
|
against the currently active
|
||||||
|
.B ServerLayout
|
||||||
|
section. The empty string "" matches an implicit layout which appears
|
||||||
|
if no named
|
||||||
|
.B ServerLayout
|
||||||
|
sections have been found.
|
||||||
.PP
|
.PP
|
||||||
The second type of entry is used to match device types. These entries take a
|
The second type of entry is used to match device types. These entries take a
|
||||||
boolean argument similar to
|
boolean argument similar to
|
||||||
|
|
|
@ -52,6 +52,7 @@ xf86ConfigSymTabRec InputClassTab[] =
|
||||||
{MATCH_USBID, "matchusbid"},
|
{MATCH_USBID, "matchusbid"},
|
||||||
{MATCH_DRIVER, "matchdriver"},
|
{MATCH_DRIVER, "matchdriver"},
|
||||||
{MATCH_TAG, "matchtag"},
|
{MATCH_TAG, "matchtag"},
|
||||||
|
{MATCH_LAYOUT, "matchlayout"},
|
||||||
{MATCH_IS_KEYBOARD, "matchiskeyboard"},
|
{MATCH_IS_KEYBOARD, "matchiskeyboard"},
|
||||||
{MATCH_IS_POINTER, "matchispointer"},
|
{MATCH_IS_POINTER, "matchispointer"},
|
||||||
{MATCH_IS_JOYSTICK, "matchisjoystick"},
|
{MATCH_IS_JOYSTICK, "matchisjoystick"},
|
||||||
|
@ -94,6 +95,7 @@ xf86parseInputClassSection(void)
|
||||||
list_init(&ptr->match_usbid);
|
list_init(&ptr->match_usbid);
|
||||||
list_init(&ptr->match_driver);
|
list_init(&ptr->match_driver);
|
||||||
list_init(&ptr->match_tag);
|
list_init(&ptr->match_tag);
|
||||||
|
list_init(&ptr->match_layout);
|
||||||
|
|
||||||
while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
|
while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
|
@ -169,6 +171,12 @@ xf86parseInputClassSection(void)
|
||||||
add_group_entry(&ptr->match_tag,
|
add_group_entry(&ptr->match_tag,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(val.str, TOKEN_SEP));
|
||||||
break;
|
break;
|
||||||
|
case MATCH_LAYOUT:
|
||||||
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
|
Error(QUOTE_MSG, "MatchLayout");
|
||||||
|
add_group_entry(&ptr->match_layout,
|
||||||
|
xstrtokenize(val.str, TOKEN_SEP));
|
||||||
|
break;
|
||||||
case MATCH_IS_KEYBOARD:
|
case MATCH_IS_KEYBOARD:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsKeyboard");
|
Error(QUOTE_MSG, "MatchIsKeyboard");
|
||||||
|
@ -307,6 +315,13 @@ xf86printInputClassSection (FILE * cf, XF86ConfInputClassPtr ptr)
|
||||||
*cur);
|
*cur);
|
||||||
fprintf(cf, "\"\n");
|
fprintf(cf, "\"\n");
|
||||||
}
|
}
|
||||||
|
list_for_each_entry(group, &ptr->match_layout, entry) {
|
||||||
|
fprintf(cf, "\tMatchLayout \"");
|
||||||
|
for (cur = group->values; *cur; cur++)
|
||||||
|
fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP,
|
||||||
|
*cur);
|
||||||
|
fprintf(cf, "\"\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (ptr->is_keyboard.set)
|
if (ptr->is_keyboard.set)
|
||||||
fprintf(cf, "\tIsKeyboard \"%s\"\n",
|
fprintf(cf, "\tIsKeyboard \"%s\"\n",
|
||||||
|
@ -392,6 +407,12 @@ xf86freeInputClassList (XF86ConfInputClassPtr ptr)
|
||||||
free(*list);
|
free(*list);
|
||||||
free(group);
|
free(group);
|
||||||
}
|
}
|
||||||
|
list_for_each_entry_safe(group, next, &ptr->match_layout, entry) {
|
||||||
|
list_del(&group->entry);
|
||||||
|
for (list = group->values; *list; list++)
|
||||||
|
free(*list);
|
||||||
|
free(group);
|
||||||
|
}
|
||||||
|
|
||||||
TestFree(ptr->comment);
|
TestFree(ptr->comment);
|
||||||
xf86optionListFree(ptr->option_lst);
|
xf86optionListFree(ptr->option_lst);
|
||||||
|
|
|
@ -358,6 +358,7 @@ typedef struct
|
||||||
struct list match_usbid;
|
struct list match_usbid;
|
||||||
struct list match_driver;
|
struct list match_driver;
|
||||||
struct list match_tag;
|
struct list match_tag;
|
||||||
|
struct list match_layout;
|
||||||
xf86TriState is_keyboard;
|
xf86TriState is_keyboard;
|
||||||
xf86TriState is_pointer;
|
xf86TriState is_pointer;
|
||||||
xf86TriState is_joystick;
|
xf86TriState is_joystick;
|
||||||
|
|
|
@ -282,6 +282,7 @@ typedef enum {
|
||||||
MATCH_USBID,
|
MATCH_USBID,
|
||||||
MATCH_DRIVER,
|
MATCH_DRIVER,
|
||||||
MATCH_TAG,
|
MATCH_TAG,
|
||||||
|
MATCH_LAYOUT,
|
||||||
MATCH_IS_KEYBOARD,
|
MATCH_IS_KEYBOARD,
|
||||||
MATCH_IS_POINTER,
|
MATCH_IS_POINTER,
|
||||||
MATCH_IS_JOYSTICK,
|
MATCH_IS_JOYSTICK,
|
||||||
|
|
|
@ -472,8 +472,6 @@ winKeybdReleaseKeys (void)
|
||||||
void
|
void
|
||||||
winSendKeyEvent (DWORD dwKey, Bool fDown)
|
winSendKeyEvent (DWORD dwKey, Bool fDown)
|
||||||
{
|
{
|
||||||
InternalEvent* events;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When alt-tabing between screens we can get phantom key up messages
|
* When alt-tabing between screens we can get phantom key up messages
|
||||||
* Here we only pass them through it we think we should!
|
* Here we only pass them through it we think we should!
|
||||||
|
@ -485,8 +483,8 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
|
||||||
|
|
||||||
QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
|
QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
|
||||||
|
|
||||||
winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
|
winDebug("winSendKeyEvent: dwKey: %d, fDown: %d\n",
|
||||||
dwKey, fDown, nevents);
|
dwKey, fDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
|
BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
|
||||||
|
|
|
@ -244,8 +244,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
|
||||||
POINTER_RELATIVE, &mask);
|
POINTER_RELATIVE, &mask);
|
||||||
|
|
||||||
#if CYGDEBUG
|
#if CYGDEBUG
|
||||||
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
|
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
|
||||||
iEventType, iButton, nevents);
|
iEventType, iButton);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,12 +305,6 @@ extern _X_EXPORT Bool InitPointerAccelerationScheme(
|
||||||
DeviceIntPtr /*dev*/,
|
DeviceIntPtr /*dev*/,
|
||||||
int /*scheme*/);
|
int /*scheme*/);
|
||||||
|
|
||||||
/**
|
|
||||||
* This is not implemented and just returns FALSE.
|
|
||||||
*/
|
|
||||||
extern _X_EXPORT _X_DEPRECATED Bool InitAbsoluteClassDeviceStruct(
|
|
||||||
DeviceIntPtr /*device*/);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool InitFocusClassDeviceStruct(
|
extern _X_EXPORT Bool InitFocusClassDeviceStruct(
|
||||||
DeviceIntPtr /*device*/);
|
DeviceIntPtr /*device*/);
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,6 @@ typedef struct _ClassesRec {
|
||||||
ButtonClassPtr button;
|
ButtonClassPtr button;
|
||||||
FocusClassPtr focus;
|
FocusClassPtr focus;
|
||||||
ProximityClassPtr proximity;
|
ProximityClassPtr proximity;
|
||||||
void* _pad0; /* keep ABI during AbsoluteClass removal */
|
|
||||||
KbdFeedbackPtr kbdfeed;
|
KbdFeedbackPtr kbdfeed;
|
||||||
PtrFeedbackPtr ptrfeed;
|
PtrFeedbackPtr ptrfeed;
|
||||||
IntegerFeedbackPtr intfeed;
|
IntegerFeedbackPtr intfeed;
|
||||||
|
@ -496,7 +495,6 @@ typedef struct _DeviceIntRec {
|
||||||
ButtonClassPtr button;
|
ButtonClassPtr button;
|
||||||
FocusClassPtr focus;
|
FocusClassPtr focus;
|
||||||
ProximityClassPtr proximity;
|
ProximityClassPtr proximity;
|
||||||
void* _pad0; /* keep ABI, was pointer to abs class */
|
|
||||||
KbdFeedbackPtr kbdfeed;
|
KbdFeedbackPtr kbdfeed;
|
||||||
PtrFeedbackPtr ptrfeed;
|
PtrFeedbackPtr ptrfeed;
|
||||||
IntegerFeedbackPtr intfeed;
|
IntegerFeedbackPtr intfeed;
|
||||||
|
|
|
@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
# include "windowstr.h"
|
# include "windowstr.h"
|
||||||
# include "pixmapstr.h"
|
# include "pixmapstr.h"
|
||||||
# include "inputstr.h"
|
# include "inputstr.h"
|
||||||
|
# include "inpututils.h"
|
||||||
# include "mi.h"
|
# include "mi.h"
|
||||||
# include "mipointer.h"
|
# include "mipointer.h"
|
||||||
# include "scrnintstr.h"
|
# include "scrnintstr.h"
|
||||||
|
|
Loading…
Reference in New Issue