mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-29 14:40:26 +01:00
fix rare segfault caused by uninitialized event queue. Happend if
FatalError Messagebox appeared because of missing font "fixed"
This commit is contained in:
parent
5e6309496d
commit
a4401712c5
1 changed files with 8 additions and 1 deletions
|
|
@ -359,14 +359,21 @@ void
|
|||
winRestoreModeKeyStates ()
|
||||
{
|
||||
DWORD dwKeyState;
|
||||
BOOL processEvents = TRUE;
|
||||
unsigned short internalKeyStates;
|
||||
|
||||
/* X server is being initialized */
|
||||
if (!g_winInternalModeKeyStatesPtr)
|
||||
return;
|
||||
|
||||
/* Only process events if the rootwindow is mapped. The keyboard events
|
||||
* will cause segfaults otherwise */
|
||||
if (WindowTable && WindowTable[0] && WindowTable[0]->mapped == FALSE)
|
||||
processEvents = FALSE;
|
||||
|
||||
/* Force to process all pending events in the mi event queue */
|
||||
mieqProcessInputEvents ();
|
||||
if (processEvents)
|
||||
mieqProcessInputEvents ();
|
||||
|
||||
/* Read the mode key states of our X server */
|
||||
internalKeyStates = *g_winInternalModeKeyStatesPtr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue