[Xfce4-commits] [xfce/xfwm4] 02/02: compositor: Rework XPresent error handler

noreply at xfce.org noreply at xfce.org
Thu May 16 22:32:11 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 47e9d5e3d365c13ac7c3d8d29bb630b08c35dfa3
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Thu May 16 22:28:28 2019 +0200

    compositor: Rework XPresent error handler
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index cc6fabe..066f93d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1687,18 +1687,16 @@ redraw_glx_texture (ScreenInfo *screen_info, XserverRegion region, gushort buffe
 
 #ifdef HAVE_PRESENT_EXTENSION
 static void
-present_error (DisplayInfo *display_info, int error_code)
+present_error (ScreenInfo *screen_info, int error_code)
 {
+    char buf[64];
     GSList *screens;
-    g_warning ("Dismissing XPresent as unusable, error %i", error_code);
 
-    for (screens = display_info->screens; screens; screens = g_slist_next (screens))
-    {
-        ScreenInfo *screen_info = ((ScreenInfo *) screens->data);
+    XGetErrorText (myScreenGetXDisplay (screen_info), error_code, buf, 63);
+    g_warning ("Dismissing XPresent as unusable, error %i (%s)", error_code, buf);
 
-        screen_info->present_pending = FALSE;
-        screen_info->use_present = FALSE;
-    }
+    screen_info->present_pending = FALSE;
+    screen_info->use_present = FALSE;
 }
 
 static void
@@ -1723,7 +1721,7 @@ present_flip (ScreenInfo *screen_info, XserverRegion region, gushort buffer)
 
     if (result != 0)
     {
-        present_error (display_info, result);
+        present_error (screen_info, result);
         return;
     }
 

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


More information about the Xfce4-commits mailing list