mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux: Release X lock when unregistering file descriptor in order to avoid deadlocks
This commit is contained in:
parent
e4a7978621
commit
bd0ca90952
1 changed files with 12 additions and 7 deletions
|
|
@ -3198,17 +3198,22 @@ void XWindowSystem::destroyXDisplay()
|
|||
{
|
||||
jassert (display != nullptr);
|
||||
|
||||
XWindowSystemUtilities::ScopedXLock xLock;
|
||||
{
|
||||
XWindowSystemUtilities::ScopedXLock xLock;
|
||||
|
||||
X11Symbols::getInstance()->xDestroyWindow (display, juce_messageWindowHandle);
|
||||
juce_messageWindowHandle = 0;
|
||||
X11Symbols::getInstance()->xSync (display, True);
|
||||
X11Symbols::getInstance()->xDestroyWindow (display, juce_messageWindowHandle);
|
||||
juce_messageWindowHandle = 0;
|
||||
X11Symbols::getInstance()->xSync (display, True);
|
||||
}
|
||||
|
||||
LinuxEventLoop::unregisterFdCallback (X11Symbols::getInstance()->xConnectionNumber (display));
|
||||
|
||||
X11Symbols::getInstance()->xCloseDisplay (display);
|
||||
display = nullptr;
|
||||
displayVisuals = nullptr;
|
||||
{
|
||||
XWindowSystemUtilities::ScopedXLock xLock;
|
||||
X11Symbols::getInstance()->xCloseDisplay (display);
|
||||
display = nullptr;
|
||||
displayVisuals = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue