xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Apr 30 19:53:12 UTC 2018


 hw/xwayland/xwayland-present.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit a843c61456b2046fb1780415f17162b503243af7
Author: Roman Gilg <subdiff at gmail.com>
Date:   Fri Apr 20 17:07:42 2018 +0200

    xwayland: restrict present cleanup to presenting and top parent window
    
    Clean up only if the request points to the presenting window or its top
    parent window.
    
    Since in this case all events are removed unconditionally, always stop
    the timer.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Roman Gilg <subdiff at gmail.com>

diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 07fdc7c18..66bfaaed0 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -77,13 +77,14 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window)
 {
     struct xwl_present_event *event, *tmp;
 
-    if (xwl_window->present_window == window || xwl_window->window == window) {
-        if (xwl_window->present_frame_callback) {
-            wl_callback_destroy(xwl_window->present_frame_callback);
-            xwl_window->present_frame_callback = NULL;
-        }
-        xwl_window->present_window = NULL;
+    if (xwl_window->present_window != window && xwl_window->window != window)
+        return;
+
+    if (xwl_window->present_frame_callback) {
+        wl_callback_destroy(xwl_window->present_frame_callback);
+        xwl_window->present_frame_callback = NULL;
     }
+    xwl_window->present_window = NULL;
 
     /* Clear remaining events */
     xorg_list_for_each_entry_safe(event, tmp, &xwl_window->present_event_list, list) {
@@ -98,8 +99,7 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window)
     }
 
     /* Clear timer */
-    if (!xwl_present_has_events(xwl_window))
-        xwl_present_free_timer(xwl_window);
+    xwl_present_free_timer(xwl_window);
 }
 
 static void


More information about the xorg-commit mailing list