summaryrefslogtreecommitdiff
path: root/hw/xnest/Cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xnest/Cursor.c')
-rw-r--r--hw/xnest/Cursor.c73
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)
+{
}