Skip to content

Commit

Permalink
xside: ignore failed XUnmapWindow on non-existing window
Browse files Browse the repository at this point in the history
It looks like something destroys application windows before GUI daemon
do it. Probably some X requests are reordered and XDestroyWindow got
handled before XUnmapWindow.
Anyway this is rather hard to find actual cause and since unmapped
window in most cases will be destroyed in a moment, simply ignore this
error. If this window was needed and was destroyed unintentionally, gui
daemon will notice it on the next request (this time not ignoring the
error).

Fixes QubesOS/qubes-issues#2085
  • Loading branch information
marmarek committed Aug 6, 2016
1 parent 08d0f82 commit 467aa9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui-daemon/xside.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ int x11_error_handler(Display * dpy, XErrorEvent * ev)
{
/* log the error */
dummy_handler(dpy, ev);
if (ev->request_code == X_DestroyWindow && ev->error_code == BadWindow) {
if ((ev->request_code == X_DestroyWindow || ev->request_code == X_UnmapWindow)
&& ev->error_code == BadWindow) {
fprintf(stderr, " someone else already destroyed this window, ignoring\n");
return 0;
}
Expand Down

0 comments on commit 467aa9a

Please sign in to comment.