mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux: Don't call XFreeCursor() on invalid display
This commit is contained in:
parent
ce16bd3df9
commit
945cf12581
1 changed files with 3 additions and 5 deletions
|
|
@ -4114,15 +4114,13 @@ void MouseCursor::showInWindow (ComponentPeer* peer) const
|
|||
{
|
||||
if (auto* lp = dynamic_cast<LinuxComponentPeer*> (peer))
|
||||
{
|
||||
auto cursor = (Cursor) getHandle();
|
||||
|
||||
ScopedXDisplay xDisplay;
|
||||
|
||||
auto cursor = (Cursor) getHandle();
|
||||
auto cursorDisplay = cursorMap[cursor];
|
||||
|
||||
if (cursorHandle != nullptr && xDisplay.display != cursorDisplay)
|
||||
if (cursorHandle != nullptr && xDisplay.display != cursorMap[cursor])
|
||||
{
|
||||
cursorMap.erase (cursor);
|
||||
XFreeCursor (cursorDisplay, cursor);
|
||||
|
||||
if (auto* customInfo = cursorHandle->getCustomInfo())
|
||||
cursorHandle->setHandle (customInfo->create());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue