1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Linux: Use synchronous X11 error handling in debug builds

This commit is contained in:
ed 2020-11-02 14:43:08 +00:00
parent a357e548a3
commit 7901eb6ca1
3 changed files with 13 additions and 0 deletions

View file

@ -181,6 +181,7 @@ bool X11Symbols::loadAllSymbols()
makeSymbolBinding (xSetWMNormalHints, "XSetWMNormalHints"),
makeSymbolBinding (xStringListToTextProperty, "XStringListToTextProperty"),
makeSymbolBinding (xSync, "XSync"),
makeSymbolBinding (xSynchronize, "XSynchronize"),
makeSymbolBinding (xTranslateCoordinates, "XTranslateCoordinates"),
makeSymbolBinding (xrmUniqueQuark, "XrmUniqueQuark"),
makeSymbolBinding (xUngrabPointer, "XUngrabPointer"),

View file

@ -453,6 +453,10 @@ public:
(::Display*, Bool),
void)
JUCE_GENERATE_FUNCTION_WITH_DEFAULT (XSynchronize, xSynchronize,
(::Display*, Bool),
int)
JUCE_GENERATE_FUNCTION_WITH_DEFAULT (XTranslateCoordinates, xTranslateCoordinates,
(::Display*, ::Window, ::Window, int, int, int*, int*, ::Window*),
Bool)

View file

@ -30,6 +30,10 @@ namespace juce
#if JUCE_DEBUG && ! defined (JUCE_DEBUG_XERRORS)
#define JUCE_DEBUG_XERRORS 1
#if ! defined (JUCE_DEBUG_XERRORS_SYNCHRONOUSLY)
#define JUCE_DEBUG_XERRORS_SYNCHRONOUSLY 1
#endif
#endif
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
@ -2719,6 +2723,10 @@ bool XWindowSystem::initialiseXDisplay()
if (display == nullptr)
return false;
#if JUCE_DEBUG_XERRORS_SYNCHRONOUSLY
X11Symbols::getInstance()->xSynchronize (display, True);
#endif
// Create a context to store user data associated with Windows we create
windowHandleXContext = (XContext) X11Symbols::getInstance()->xrmUniqueQuark();