[Xfce4-commits] [xfce/xfwm4] 04/07: compositor: Avoid render XError when zooming with GLX

noreply at xfce.org noreply at xfce.org
Wed May 8 09:31:23 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit ca85547b9dcdc8f307b746c85eb051bf97d75098
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Wed May 8 09:06:07 2019 +0200

    compositor: Avoid render XError when zooming with GLX
    
    When using GLX as backend, we are not using Render for zooming and the
    associated `zoomBuffer` is not created, so trying to use that for any
    Render operation will generate XErrors.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index c8b72f8..f0459c8 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3241,25 +3241,41 @@ recenter_zoomed_area (ScreenInfo *screen_info, int x_root, int y_root)
 
     if (zf > (1 << 14) && zf < (1 << 16))
     {
-        XRenderSetPictureFilter (myScreenGetXDisplay (screen_info),
-                                 screen_info->zoomBuffer,
-                                 FilterBilinear, NULL, 0);
 #ifdef HAVE_EPOXY
-        screen_info->texture_filter = GL_LINEAR;
+        if (screen_info->use_glx)
+        {
+            screen_info->texture_filter = GL_LINEAR;
+        }
 #endif /* HAVE_EPOXY */
+        if (screen_info->zoomBuffer)
+        {
+            XRenderSetPictureFilter (myScreenGetXDisplay (screen_info),
+                                     screen_info->zoomBuffer,
+                                     FilterBilinear, NULL, 0);
+        }
     }
     else
     {
-        XRenderSetPictureFilter (myScreenGetXDisplay (screen_info),
-                                 screen_info->zoomBuffer,
-                                 FilterNearest, NULL, 0);
 #ifdef HAVE_EPOXY
-        screen_info->texture_filter = GL_NEAREST;
+        if (screen_info->use_glx)
+        {
+            screen_info->texture_filter = GL_NEAREST;
+        }
 #endif /* HAVE_EPOXY */
+        if (screen_info->zoomBuffer)
+        {
+            XRenderSetPictureFilter (myScreenGetXDisplay (screen_info),
+                                     screen_info->zoomBuffer,
+                                     FilterNearest, NULL, 0);
+        }
+    }
+    /* zoomBuffer might be None if we're using GLX */
+    if (screen_info->zoomBuffer)
+    {
+        XRenderSetPictureTransform (myScreenGetXDisplay (screen_info),
+                                    screen_info->zoomBuffer,
+                                    &screen_info->transform);
     }
-    XRenderSetPictureTransform (myScreenGetXDisplay (screen_info),
-                                screen_info->zoomBuffer,
-                                &screen_info->transform);
 
     damage_screen (screen_info);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list