mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 632969 - 1/4 - X error handling fixes - r=bjacob, a=blocker
This commit is contained in:
parent
cbdf33fdbe
commit
e9884a8b98
@ -46,11 +46,13 @@ ScopedXErrorHandler::ErrorEvent* ScopedXErrorHandler::sXErrorPtr;
|
||||
int
|
||||
ScopedXErrorHandler::ErrorHandler(Display *, XErrorEvent *ev)
|
||||
{
|
||||
sXErrorPtr->mError = *ev;
|
||||
// only record the error if no error was previously recorded.
|
||||
// this means that in case of multiple errors, it's the first error that we report.
|
||||
if (!sXErrorPtr->mError.error_code)
|
||||
sXErrorPtr->mError = *ev;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ScopedXErrorHandler::ScopedXErrorHandler()
|
||||
{
|
||||
// let sXErrorPtr point to this object's mXError object, but don't reset this mXError object!
|
||||
|
@ -158,9 +158,11 @@ public:
|
||||
|
||||
~ScopedXErrorHandler();
|
||||
|
||||
/** \returns true if a X error occurred since the last time this method was called on this ScopedXErrorHandler object.
|
||||
/** \returns true if a X error occurred since the last time this method was called on this ScopedXErrorHandler object,
|
||||
* or since the creation of this ScopedXErrorHandler object if this method was never called on it.
|
||||
*
|
||||
* \param ev this optional parameter, if set, will be filled with the XErrorEvent object
|
||||
* \param ev this optional parameter, if set, will be filled with the XErrorEvent object. If multiple errors occurred,
|
||||
* the first one will be returned.
|
||||
*/
|
||||
bool SyncAndGetError(Display *dpy, XErrorEvent *ev = nsnull);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user