diff options
author | marha <marha@users.sourceforge.net> | 2014-01-26 20:05:50 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-26 20:10:14 +0100 |
commit | 30af30b78075159fce477ae99cc72540133714d0 (patch) | |
tree | 1028af42bd030d09bf9c9cb6085665300326abc6 /xorg-server/hw/kdrive | |
parent | 775780ea274e6602c2d64de33a98ee35979cc330 (diff) | |
download | vcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.gz vcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.bz2 vcxsrv-30af30b78075159fce477ae99cc72540133714d0.zip |
xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014
xserver commit c1ce807d9f18f215332d7eeb844e8c640f71c53c
libxcb commit e7263931aff3e3450dc938ad465a7577f943549f
libxcb/xcb-proto commit d898fd39ad6c82207eb78666b2daad982dd757b5
randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6
libxtrans commit e1e6121a1638d43d9929589b4723da2b38cb6b44
fontconfig commit e2b406053c2937799da8636c56b72a77998bcab0
mesa commit 07149f0252c52b4ac58b6df4e307fd786b49b490
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 27 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrdriext.c | 1 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kinput.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kxv.c | 4 |
4 files changed, 30 insertions, 6 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index 12c708616..da80c9577 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -1008,6 +1008,29 @@ ephyrProcessButtonRelease(xcb_generic_event_t *xev) KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0); } +/* Xephyr wants ctrl+shift to grab the window, but that conflicts with + ctrl+alt+shift key combos. Remember the modifier state on key presses and + releases, if mod1 is pressed, we need ctrl, shift and mod1 released + before we allow a shift-ctrl grab activation. + + note: a key event contains the mask _before_ the current key takes + effect, so mod1_was_down will be reset on the first key press after all + three were released, not on the last release. That'd require some more + effort. + */ +static int +ephyrUpdateGrabModifierState(int state) +{ + static int mod1_was_down = 0; + + if ((state & (XCB_MOD_MASK_CONTROL|XCB_MOD_MASK_SHIFT|XCB_MOD_MASK_1)) == 0) + mod1_was_down = 0; + else if (state & XCB_MOD_MASK_1) + mod1_was_down = 1; + + return mod1_was_down; +} + static void ephyrProcessKeyPress(xcb_generic_event_t *xev) { @@ -1018,6 +1041,7 @@ ephyrProcessKeyPress(xcb_generic_event_t *xev) return; } + ephyrUpdateGrabModifierState(key->state); ephyrUpdateModifierState(key->state); KdEnqueueKeyboardEvent(ephyrKbd, key->detail, FALSE); } @@ -1029,6 +1053,7 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev) xcb_key_release_event_t *key = (xcb_key_release_event_t *)xev; static xcb_key_symbols_t *keysyms; static int grabbed_screen = -1; + int mod1_down = ephyrUpdateGrabModifierState(key->state); if (!keysyms) keysyms = xcb_key_symbols_alloc(conn); @@ -1049,7 +1074,7 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev) hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)"); } - else { + else if (!mod1_down) { /* Attempt grab */ xcb_grab_keyboard_cookie_t kbgrabc = xcb_grab_keyboard(conn, diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c index e2b33db03..8368d1233 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c @@ -1098,7 +1098,6 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client) if (rep.numClipRects) { if (clipRects) { ScreenPtr pScreen = screenInfo.screens[stuff->screen]; - int i = 0; EPHYR_LOG("clip list of host gl drawable:\n"); for (i = 0; i < rep.numClipRects; i++) { diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index 7d09e282f..a539ca513 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -1940,7 +1940,7 @@ _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, } void -KdBlockHandler(ScreenPtr pScreen, void *timeout, void *readmask) +KdBlockHandler(ScreenPtr pScreen, void *timeo, void *readmask) { KdPointerInfo *pi; int myTimeout = 0; @@ -1962,7 +1962,7 @@ KdBlockHandler(ScreenPtr pScreen, void *timeout, void *readmask) myTimeout = 20; } if (myTimeout > 0) - AdjustWaitForDelay(timeout, myTimeout); + AdjustWaitForDelay(timeo, myTimeout); } void diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c index 9e76eadf0..445eb605b 100644 --- a/xorg-server/hw/kdrive/src/kxv.c +++ b/xorg-server/hw/kdrive/src/kxv.c @@ -1821,14 +1821,14 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr, w >>= 1; for (j = 0; j < h; j++) { - CARD32 *dst = (CARD32 *) dst1; + CARD32 *dst32 = (CARD32 *) dst1; CARD8 *s1l = src1; CARD8 *s1r = src1 + srcNext; CARD8 *s2 = src2; CARD8 *s3 = src3; for (i = 0; i < w; i++) { - *dst++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); + *dst32++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); s1l += srcRight; s1r += srcRight; s2 += srcRight2; |