mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-10 23:33:46 +00:00
input: drop FP1616 macro
The double_to_f1616() functions do the same thing, and they're tested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
011f845880
commit
fd214aabf7
6 changed files with 20 additions and 20 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include "enterleave.h"
|
||||
#include "eventconvert.h"
|
||||
#include "xkbsrv.h"
|
||||
#include "inpututils.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
|
@ -799,8 +800,8 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
|
|||
xi2event->deviceid = dev->id;
|
||||
xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */
|
||||
xi2event->mode = mode;
|
||||
xi2event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
|
||||
xi2event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
|
||||
xi2event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x);
|
||||
xi2event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y);
|
||||
|
||||
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
|
||||
if (BitIsOn(mouse->button->down, i))
|
||||
|
|
|
|||
|
|
@ -673,8 +673,8 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
|
|||
xde->valuators_len = vallen;
|
||||
xde->deviceid = ev->deviceid;
|
||||
xde->sourceid = ev->sourceid;
|
||||
xde->root_x = FP1616(ev->root_x, ev->root_x_frac);
|
||||
xde->root_y = FP1616(ev->root_y, ev->root_y_frac);
|
||||
xde->root_x = double_to_fp1616(ev->root_x + ev->root_x_frac);
|
||||
xde->root_y = double_to_fp1616(ev->root_y + ev->root_y_frac);
|
||||
|
||||
if (ev->type == ET_TouchUpdate)
|
||||
xde->flags |= (ev->flags & TOUCH_PENDING_END) ? XITouchPendingEnd : 0;
|
||||
|
|
|
|||
|
|
@ -2444,8 +2444,8 @@ FixUpEventFromWindow(SpritePtr pSprite,
|
|||
}
|
||||
|
||||
if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
|
||||
event->event_x = event->root_x - FP1616(pWin->drawable.x, 0);
|
||||
event->event_y = event->root_y - FP1616(pWin->drawable.y, 0);
|
||||
event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x);
|
||||
event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y);
|
||||
event->child = child;
|
||||
}
|
||||
else {
|
||||
|
|
@ -4573,8 +4573,8 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
|
|||
event->deviceid = mouse->id;
|
||||
event->sourceid = sourceid;
|
||||
event->mode = mode;
|
||||
event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
|
||||
event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
|
||||
event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x);
|
||||
event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y);
|
||||
|
||||
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
|
||||
if (BitIsOn(mouse->button->down, i))
|
||||
|
|
|
|||
Loading…
Reference in a new issue