X11: Flush requests after event processing

This fixes the "window manager thinks Clonk has hung" problem.

http://bugs.openclonk.org/view.php?id=3
stable-5.2
Günther Brammer 2009-10-24 01:35:46 +02:00
parent 1c5bf094cd
commit 442d5b2c58
2 changed files with 5 additions and 3 deletions

View File

@ -618,14 +618,17 @@ void CStdApp::OnXInput()
Priv->tasked_out = true;
Priv->pending_desktop = false;
}
// At least the _NET_WM_PING reply needs to be flushed,
// and having received events is a good heuristic for
// having issued X11 commands, even if most events
// are mouse moves that don't generate X11 commands.
XFlush(dpy);
}
void CStdApp::OnStdInInput()
{
if(!ReadStdInCommand())
{
// TODO: This should only cause HandleMessage to return
// HR_Failure...
Quit();
}
}

View File

@ -159,7 +159,6 @@ class CStdAppPrivate {
int xrandr_event;
bool tasked_out; int wdt; int hgt;
bool pending_desktop;
static const int PENDING_DESKTOP_DELAY = 3;
XIM xim;
XIC xic;
Bool detectable_autorepeat_supported;