diff options
author | Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> | 2022-09-11 04:30:56 +0900 |
---|---|---|
committer | Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> | 2022-09-11 04:30:56 +0900 |
commit | f2cf74aa54b1bcadcd06fbc6256ff49bf6f456df (patch) | |
tree | 014c799fdf38c128f3b6147aa93c22b22b7581dd | |
parent | 27c2d76404c7b440a6662446b189fa257c4cebfc (diff) |
Use consistent indent and style.
-rw-r--r-- | src/wsfb_driver.c | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c index a0078fb..3ad9614 100644 --- a/src/wsfb_driver.c +++ b/src/wsfb_driver.c @@ -202,7 +202,7 @@ WsfbSetup(pointer module, pointer opts, int *errmaj, int *errmin) static Bool setupDone = FALSE; #if !defined(__OpenBSD__) && !defined(__NetBSD__) - return NULL; + return NULL; #endif if (!setupDone) { @@ -632,13 +632,13 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) static void wsfbUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { - shadowUpdateRotatePacked(pScreen, pBuf); + shadowUpdateRotatePacked(pScreen, pBuf); } static void wsfbUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { - shadowUpdatePacked(pScreen, pBuf); + shadowUpdatePacked(pScreen, pBuf); } static Bool @@ -959,39 +959,40 @@ WsfbWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, static void WsfbPointerMoved(SCRN_ARG_TYPE arg, int x, int y) { - SCRN_INFO_PTR(arg); - WsfbPtr fPtr = WSFBPTR(pScrn); - int newX, newY; - - switch (fPtr->rotate) - { - case WSFB_ROTATE_CW: - /* 90 degrees CW rotation. */ - newX = pScrn->pScreen->height - y - 1; - newY = x; - break; - - case WSFB_ROTATE_CCW: - /* 90 degrees CCW rotation. */ - newX = y; - newY = pScrn->pScreen->width - x - 1; - break; - - case WSFB_ROTATE_UD: - /* 180 degrees UD rotation. */ - newX = pScrn->pScreen->width - x - 1; - newY = pScrn->pScreen->height - y - 1; - break; - - default: - /* No rotation. */ - newX = x; - newY = y; - break; - } - - /* Pass adjusted pointer coordinates to wrapped PointerMoved function. */ - (*fPtr->PointerMoved)(arg, newX, newY); + SCRN_INFO_PTR(arg); + WsfbPtr fPtr = WSFBPTR(pScrn); + int newX, newY; + + switch (fPtr->rotate) { + case WSFB_ROTATE_CW: + /* 90 degrees CW rotation. */ + newX = pScrn->pScreen->height - y - 1; + newY = x; + break; + + case WSFB_ROTATE_CCW: + /* 90 degrees CCW rotation. */ + newX = y; + newY = pScrn->pScreen->width - x - 1; + break; + + case WSFB_ROTATE_UD: + /* 180 degrees UD rotation. */ + newX = pScrn->pScreen->width - x - 1; + newY = pScrn->pScreen->height - y - 1; + break; + + default: + /* No rotation. */ + newX = x; + newY = y; + break; + } + + /* + * Pass adjusted pointer coordinates to wrapped PointerMoved function. + */ + (*fPtr->PointerMoved)(arg, newX, newY); } static Bool |