steamos-compositor 1.14

This commit is contained in:
Pierre-Loup Griffais 2013-12-04 14:18:32 -08:00 committed by Pierre-Loup A. Griffais
parent 09f33e9374
commit 503b35b547
2 changed files with 16 additions and 6 deletions

10
debian/changelog vendored
View file

@ -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 <pgriffais@valvesoftware.com> Fri, 22 Nov 2013 16:02:08 -0800
steamos-compositor (1.13) alchemist; urgency=low steamos-compositor (1.13) alchemist; urgency=low
* update copyright * update copyright

View file

@ -777,13 +777,13 @@ paint_debug_info (Display *dpy)
win *overlay = find_win(dpy, currentOverlayWindow); win *overlay = find_win(dpy, currentOverlayWindow);
win *notification = find_win(dpy, currentNotificationWindow); 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); sprintf(messageBuffer, "Compositing overlay at opacity %f", overlay->opacity / (float)OPAQUE);
paint_message(messageBuffer, Y, 1.0f, 0.0f, 1.0f); Y += textYMax; 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); sprintf(messageBuffer, "Compositing notification at opacity %f", notification->opacity / (float)OPAQUE);
paint_message(messageBuffer, Y, 1.0f, 0.0f, 1.0f); Y += textYMax; 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); overlay = find_win(dpy, currentOverlayWindow);
notification = find_win(dpy, currentNotificationWindow); notification = find_win(dpy, currentNotificationWindow);
if (gameFocused) if (gamesRunningCount)
{ {
if (overlay && overlay->damaged) if (overlay && overlay->damaged)
overlayDamaged = True; overlayDamaged = True;
@ -902,7 +902,7 @@ paint_all (Display *dpy)
} }
} }
if (gameFocused && overlay) if (gamesRunningCount && overlay)
{ {
if (overlay->opacity) if (overlay->opacity)
{ {
@ -912,7 +912,7 @@ paint_all (Display *dpy)
overlay->damaged = 0; overlay->damaged = 0;
} }
if (gameFocused && notification) if (gamesRunningCount && notification)
{ {
if (notification->opacity) if (notification->opacity)
{ {
@ -2079,7 +2079,7 @@ main (int argc, char **argv)
case MotionNotify: case MotionNotify:
{ {
win * w = find_win(dpy, ev.xmotion.window); win * w = find_win(dpy, ev.xmotion.window);
if (w->id == currentFocusWindow) if (w && w->id == currentFocusWindow)
{ {
// Some stuff likes to warp in-place // Some stuff likes to warp in-place
if (cursorX == ev.xmotion.x && cursorY == ev.xmotion.y) if (cursorX == ev.xmotion.x && cursorY == ev.xmotion.y)