From 503b35b547db4e329c8a362c4c9cf2a4fbb5da04 Mon Sep 17 00:00:00 2001 From: Pierre-Loup Griffais Date: Wed, 4 Dec 2013 14:18:32 -0800 Subject: [PATCH] steamos-compositor 1.14 --- debian/changelog | 10 ++++++++++ src/steamcompmgr.c | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index f7a7033..897b9e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +steamos-compositor (1.14) alchemist; urgency=low + + * Fix possible race condition crash when getting Motion events on out-of-date + or yet-untracked windows. + * Present the overlay if it's there and a game is running, not only if it + has a window. This ties in with work in Steam to have the overlay window + have the same lifetime as the application itself instead of its GL context. + + -- Pierre-Loup A. Griffais Fri, 22 Nov 2013 16:02:08 -0800 + steamos-compositor (1.13) alchemist; urgency=low * update copyright diff --git a/src/steamcompmgr.c b/src/steamcompmgr.c index c9f95ba..acd10f6 100644 --- a/src/steamcompmgr.c +++ b/src/steamcompmgr.c @@ -777,13 +777,13 @@ paint_debug_info (Display *dpy) win *overlay = find_win(dpy, currentOverlayWindow); win *notification = find_win(dpy, currentNotificationWindow); - if (overlay && gameFocused && overlay->opacity) + if (overlay && gamesRunningCount && overlay->opacity) { sprintf(messageBuffer, "Compositing overlay at opacity %f", overlay->opacity / (float)OPAQUE); paint_message(messageBuffer, Y, 1.0f, 0.0f, 1.0f); Y += textYMax; } - if (notification && gameFocused && notification->opacity) + if (notification && gamesRunningCount && notification->opacity) { sprintf(messageBuffer, "Compositing notification at opacity %f", notification->opacity / (float)OPAQUE); paint_message(messageBuffer, Y, 1.0f, 0.0f, 1.0f); Y += textYMax; @@ -819,7 +819,7 @@ paint_all (Display *dpy) overlay = find_win(dpy, currentOverlayWindow); notification = find_win(dpy, currentNotificationWindow); - if (gameFocused) + if (gamesRunningCount) { if (overlay && overlay->damaged) overlayDamaged = True; @@ -902,7 +902,7 @@ paint_all (Display *dpy) } } - if (gameFocused && overlay) + if (gamesRunningCount && overlay) { if (overlay->opacity) { @@ -912,7 +912,7 @@ paint_all (Display *dpy) overlay->damaged = 0; } - if (gameFocused && notification) + if (gamesRunningCount && notification) { if (notification->opacity) { @@ -2079,7 +2079,7 @@ main (int argc, char **argv) case MotionNotify: { win * w = find_win(dpy, ev.xmotion.window); - if (w->id == currentFocusWindow) + if (w && w->id == currentFocusWindow) { // Some stuff likes to warp in-place if (cursorX == ev.xmotion.x && cursorY == ev.xmotion.y)