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:
parent
a357e548a3
commit
7901eb6ca1
3 changed files with 13 additions and 0 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue