unredirect on a window with bad timing can cause a BadValue error
authorDana Jansens <danakj@orodu.net>
Fri, 25 Jun 2010 17:43:21 +0000 (19:43 +0200)
committerDana Jansens <danakj@orodu.net>
Sat, 26 Jun 2010 23:30:51 +0000 (01:30 +0200)
exemplified by right clicking on wbar a lot causing it to remap itself

openbox/composite.c

index ea8fbca..6e52ead 100644 (file)
@@ -649,8 +649,11 @@ static void composite_window_unredir(ObWindow *w)
 {
     if (!w->redir) return;
 
+    /* this call can cause a BadValue error */
+    obt_display_ignore_errors(TRUE);
     XCompositeUnredirectWindow(obt_display, window_redir(w),
                                CompositeRedirectManual);
+    obt_display_ignore_errors(FALSE);
     w->is_redir = FALSE;
 }