aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-29 15:44:00 +0200
committermarha <marha@users.sourceforge.net>2011-05-29 15:44:00 +0200
commit75b5635aa9e9791d10e3f63538e75237303ee6da (patch)
tree3467c4f258773ec64aea7c4dda11b8574df9791f /xorg-server/hw/kdrive
parentb2e1c9dff46fdf1b5936115531693981454ca466 (diff)
parent1ccf18dc09e288ddf937aa890b50c8d0a9df4319 (diff)
downloadvcxsrv-75b5635aa9e9791d10e3f63538e75237303ee6da.tar.gz
vcxsrv-75b5635aa9e9791d10e3f63538e75237303ee6da.tar.bz2
vcxsrv-75b5635aa9e9791d10e3f63538e75237303ee6da.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libX11/specs/libX11/CH08.xml mesalib/src/mesa/main/dlist.c mesalib/src/mesa/main/fbobject.c mesalib/src/mesa/main/queryobj.c mesalib/src/mesa/main/shaderapi.c mesalib/src/mesa/main/teximage.c mesalib/src/mesa/program/ir_to_mesa.cpp mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c mesalib/src/mesa/state_tracker/st_cb_drawpixels.c mesalib/src/mesa/state_tracker/st_cb_readpixels.c mesalib/src/mesa/state_tracker/st_cb_texture.c mkfontscale/list.h pixman/pixman/Makefile.win32 xorg-server/dix/devices.c xorg-server/dix/events.c xorg-server/dix/inpututils.c xorg-server/fb/fbbltone.c xorg-server/hw/kdrive/ephyr/ephyr.c xorg-server/hw/kdrive/ephyr/ephyrinit.c xorg-server/hw/xfree86/common/xf86Module.h xorg-server/hw/xfree86/common/xf86Xinput.c xorg-server/hw/xfree86/man/xorg.conf.man xorg-server/hw/xwin/winkeybd.c xorg-server/hw/xwin/winmouse.c xorg-server/include/input.h xorg-server/include/inputstr.h xorg-server/mi/mieq.c xorg-server/randr/rrscreen.c xorg-server/xkeyboard-config/rules/base.extras.xml.in xorg-server/xkeyboard-config/rules/base.xml.in
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c25
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrinit.c7
2 files changed, 29 insertions, 3 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 4519398a9..b08dc1e40 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -52,6 +52,7 @@ Bool ephyrNoDRI=FALSE ;
Bool ephyrNoXV=FALSE ;
static int mouseState = 0;
+static Rotation ephyrRandr = RR_Rotate_0;
typedef struct _EphyrInputPrivate {
Bool enabled;
@@ -252,7 +253,11 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
EPHYR_LOG("screen->width: %d, screen->height: %d index=%d",
screen->width, screen->height, screen->mynum);
- KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
+ /*
+ * Use the rotation last applied to ourselves (in the Xephyr case the fb
+ * coordinate system moves independently of the pointer coordiante system).
+ */
+ KdComputePointerMatrix (&m, ephyrRandr, screen->width, screen->height);
KdSetPointerMatrix (&m);
priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
@@ -533,7 +538,15 @@ ephyrRandRSetConfig (ScreenPtr pScreen,
* Set new configuration
*/
- scrpriv->randr = KdAddRotation (screen->randr, randr);
+ /*
+ * We need to store the rotation value for pointer coords transformation;
+ * though initially the pointer and fb rotation are identical, when we map
+ * the fb, the screen will be reinitialized and return into an unrotated
+ * state (presumably the HW is taking care of the rotation of the fb), but the
+ * pointer still needs to be transformed.
+ */
+ ephyrRandr = KdAddRotation (screen->randr, randr);
+ scrpriv->randr = ephyrRandr;
ephyrUnmapFramebuffer (screen);
@@ -1069,6 +1082,14 @@ MouseInit (KdPointerInfo *pi)
pi->nButtons = 32;
free(pi->name);
pi->name = strdup("Xephyr virtual mouse");
+
+ /*
+ * Must transform pointer coords since the pointer position
+ * relative to the Xephyr window is controlled by the host server and
+ * remains constant regardless of any rotation applied to the Xephyr screen.
+ */
+ pi->transformCoordinates = TRUE;
+
ephyrMouse = pi;
return Success;
}
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index b90b92bac..9be68b08b 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -370,13 +370,18 @@ ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
return TRUE;
}
+static void
+ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+}
+
miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
ephyrRealizeCursor,
ephyrUnrealizeCursor,
ephyrSetCursor,
ephyrMoveCursor,
ephyrDeviceCursorInitialize,
- NULL
+ ephyrDeviceCursorCleanup
};