From 1fc30b7e60813a3918b2a023a4ec1149d2769581 Mon Sep 17 00:00:00 2001 From: Pierre-Loup Griffais Date: Tue, 12 Nov 2013 19:13:46 -0800 Subject: [PATCH] SteamOS compositor 1.10 with mouse fixes for Superbrothers and scaled cursors. --- debian/changelog | 7 +++++++ src/steamcompmgr.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a659956..0000478 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +steamos-compositor (1.10) alchemist; urgency=low + + * Monitor mouse input of the child window the legacy SDL1.2 fullscreen. + * Clamp fake cursor image. + + -- Pierre-Loup A. Griffais Tue, 12 Nov 2013 18:45:37 -0800 + steamos-compositor (1.9) alchemist; urgency=low * Add SDL_image dependency for loadargbcursor. diff --git a/src/steamcompmgr.c b/src/steamcompmgr.c index b9f8f47..6bd915f 100644 --- a/src/steamcompmgr.c +++ b/src/steamcompmgr.c @@ -503,6 +503,9 @@ paint_fake_cursor (Display *dpy, win *w) glBindTexture(GL_TEXTURE_2D, cursorTextureName); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, cursorWidth, cursorHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, cursorDataBuffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + XFree(im); cursorImageDirty = False; @@ -1222,6 +1225,9 @@ get_size_hints(Display *dpy, win *w) XMoveWindow(dpy, children[0], 0, 0); w->ignoreOverrideRedirect = True; + + // Look for mouse motion in that child while we're at it. + XSelectInput(dpy, children[0], PointerMotionMask); } } @@ -2062,7 +2068,9 @@ main (int argc, char **argv) } break; case MotionNotify: - if (ev.xmotion.window == currentFocusWindow) + { + win * w = find_win(dpy, ev.xmotion.window); + if (w->id == currentFocusWindow) { // Some stuff likes to warp in-place if (cursorX == ev.xmotion.x && cursorY == ev.xmotion.y) @@ -2090,6 +2098,7 @@ main (int argc, char **argv) apply_cursor_state(dpy); } break; + } default: if (ev.type == damage_event + XDamageNotify) {