From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- xorg-server/Xi/xiwarppointer.c | 69 ++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 39 deletions(-) (limited to 'xorg-server/Xi/xiwarppointer.c') diff --git a/xorg-server/Xi/xiwarppointer.c b/xorg-server/Xi/xiwarppointer.c index 11ab241b5..3f051f759 100644 --- a/xorg-server/Xi/xiwarppointer.c +++ b/xorg-server/Xi/xiwarppointer.c @@ -33,18 +33,17 @@ #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include "scrnintstr.h" /* screen structure */ +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" -#include "mipointer.h" /* for miPointerUpdateSprite */ - +#include "mipointer.h" /* for miPointerUpdateSprite */ #include "xiwarppointer.h" /*********************************************************************** @@ -89,24 +88,20 @@ ProcXIWarpPointer(ClientPtr client) rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); - if (rc != Success) - { + if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } if ((!IsMaster(pDev) && !IsFloating(pDev)) || - (IsMaster(pDev) && !IsPointerDevice(pDev))) - { + (IsMaster(pDev) && !IsPointerDevice(pDev))) { client->errorValue = stuff->deviceid; return BadDevice; } - if (stuff->dst_win != None) - { + if (stuff->dst_win != None) { rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess); - if (rc != Success) - { + if (rc != Success) { client->errorValue = stuff->dst_win; return rc; } @@ -116,19 +111,17 @@ ProcXIWarpPointer(ClientPtr client) x = pSprite->hotPhys.x; y = pSprite->hotPhys.y; - src_x = stuff->src_x / (double)(1 << 16); - src_y = stuff->src_y / (double)(1 << 16); - dst_x = stuff->dst_x / (double)(1 << 16); - dst_y = stuff->dst_y / (double)(1 << 16); + src_x = stuff->src_x / (double) (1 << 16); + src_y = stuff->src_y / (double) (1 << 16); + dst_x = stuff->dst_x / (double) (1 << 16); + dst_y = stuff->dst_y / (double) (1 << 16); - if (stuff->src_win != None) - { + if (stuff->src_win != None) { int winX, winY; WindowPtr src; rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess); - if (rc != Success) - { + if (rc != Success) { client->errorValue = stuff->src_win; return rc; } @@ -136,22 +129,22 @@ ProcXIWarpPointer(ClientPtr client) winX = src->drawable.x; winY = src->drawable.y; if (src->drawable.pScreen != pSprite->hotPhys.pScreen || - x < winX + src_x || - y < winY + src_y || - (stuff->src_width != 0 && - winX + src_x + (int)stuff->src_width < 0) || - (stuff->src_height != 0 && - winY + src_y + (int)stuff->src_height < y) || - !PointInWindowIsVisible(src, x, y)) + x < winX + src_x || + y < winY + src_y || + (stuff->src_width != 0 && + winX + src_x + (int) stuff->src_width < 0) || + (stuff->src_height != 0 && + winY + src_y + (int) stuff->src_height < y) || + !PointInWindowIsVisible(src, x, y)) return Success; } - if (dest) - { + if (dest) { x = dest->drawable.x; y = dest->drawable.y; newScreen = dest->drawable.pScreen; - } else + } + else newScreen = pSprite->hotPhys.pScreen; x += dst_x; @@ -167,8 +160,7 @@ ProcXIWarpPointer(ClientPtr client) else if (y > newScreen->height) y = newScreen->height - 1; - if (newScreen == pSprite->hotPhys.pScreen) - { + if (newScreen == pSprite->hotPhys.pScreen) { if (x < pSprite->physLimits.x1) x = pSprite->physLimits.x1; else if (x >= pSprite->physLimits.x2) @@ -181,9 +173,9 @@ ProcXIWarpPointer(ClientPtr client) if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &x, &y); - (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE); - } else if (!PointerConfinedToScreen(pDev)) - { + (*newScreen->SetCursorPosition) (pDev, newScreen, x, y, TRUE); + } + else if (!PointerConfinedToScreen(pDev)) { NewCurrentScreen(pDev, newScreen, x, y); } @@ -196,4 +188,3 @@ ProcXIWarpPointer(ClientPtr client) here though. */ return Success; } - -- cgit v1.2.3