diff options
author | Keith Packard <keithp@keithp.com> | 2004-08-11 22:40:14 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2004-08-11 22:40:14 +0000 |
commit | fd439afdfe7ba451aff19b62d1764e4dfd0b782f (patch) | |
tree | ef70f8b2e726f132b3fe089f6fc02f5770149517 /hw/xnest/Cursor.c | |
parent | f95293e5253904883d3b40f9e68e6175247754a3 (diff) |
Add COMPOSITE change to fbCopyWindow (not needed yet)
Xnest was half-using midispcur and doing a bad job of it. Replace all of
that code with mipointer which does a lot of the work.
Support DDXen which don't provide GetWindowPixmap, or which return NULL for
the root pixmap.
Diffstat (limited to 'hw/xnest/Cursor.c')
-rw-r--r-- | hw/xnest/Cursor.c | 73 |
1 files changed, 11 insertions, 62 deletions
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 146e7ebd0..aaab62c23 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -33,59 +33,6 @@ is" without express or implied warranty. #include "Keyboard.h" #include "Args.h" -void -xnestConstrainCursor(ScreenPtr pScreen, BoxPtr pBox) -{ -#ifdef _XSERVER64 - Window64 wroot; -#else - Window wroot; -#endif - - int wx, wy; - unsigned int wwidth, wheight; - unsigned int wborderwidth; - unsigned int wdepth; - - XGetGeometry(xnestDisplay, xnestDefaultWindows[pScreen->myNum], &wroot, - &wx, &wy, &wwidth, &wheight, &wborderwidth, &wdepth); - - if (pBox->x1 <= 0 && pBox->y1 <= 0 && - pBox->x2 >= wwidth && pBox->y2 >= wheight) - XUngrabPointer(xnestDisplay, CurrentTime); - else { - XReparentWindow(xnestDisplay, xnestConfineWindow, - xnestDefaultWindows[pScreen->myNum], - pBox->x1, pBox->y1); - XResizeWindow(xnestDisplay, xnestConfineWindow, - pBox->x2 - pBox->x1, pBox->y2 - pBox->y1); - - XGrabPointer(xnestDisplay, - xnestDefaultWindows[pScreen->myNum], - True, - xnestEventMask & (~XNEST_KEYBOARD_EVENT_MASK|KeymapStateMask), - GrabModeAsync, GrabModeAsync, - xnestConfineWindow, - None, CurrentTime); - } -} - -void -xnestCursorLimits(ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, - BoxPtr pTopLeftBox) -{ - *pTopLeftBox = *pHotBox; -} - -Bool -xnestDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor) -{ - XDefineCursor(xnestDisplay, - xnestDefaultWindows[pScreen->myNum], - xnestCursor(pCursor, pScreen)); - return True; -} - Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { @@ -192,15 +139,17 @@ xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed) &fg_color, &bg_color); } -Bool -xnestSetCursorPosition(ScreenPtr pScreen, int x, int y, Bool generateEvent) +void xnestSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { - int i; + if (pCursor) + { + XDefineCursor(xnestDisplay, + xnestDefaultWindows[pScreen->myNum], + xnestCursor(pCursor, pScreen)); + } +} - for (i = 0; i < xnestNumScreens; i++) - XWarpPointer(xnestDisplay, xnestDefaultWindows[i], - xnestDefaultWindows[pScreen->myNum], - 0, 0, 0, 0, x, y); - - return True; +void +xnestMoveCursor (ScreenPtr pScreen, int x, int y) +{ } |