x11drv: Ignore X errors caused by windows being created or deleted.
This commit is contained in:
parent
eb7ef83357
commit
fb8ca46e82
|
@ -538,6 +538,7 @@ extern int managed_mode;
|
|||
extern int private_color_map;
|
||||
extern int copy_default_colors;
|
||||
extern int alloc_system_colors;
|
||||
extern int xrender_error_base;
|
||||
|
||||
extern BYTE key_state_table[256];
|
||||
extern POINT cursor_pos;
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_X11_EXTENSIONS_XRENDER_H
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#endif
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
@ -85,6 +88,7 @@ int client_side_antialias_with_render = 1;
|
|||
int copy_default_colors = 128;
|
||||
int alloc_system_colors = 256;
|
||||
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
|
||||
int xrender_error_base = 0;
|
||||
|
||||
static BOOL desktop_dbl_buf = TRUE;
|
||||
|
||||
|
@ -161,6 +165,18 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
|
|||
static inline BOOL ignore_error( Display *display, XErrorEvent *event )
|
||||
{
|
||||
if (event->request_code == X_SetInputFocus && event->error_code == BadMatch) return TRUE;
|
||||
|
||||
/* ignore a number of errors on gdi display caused by creating/destroying windows */
|
||||
if (display == gdi_display)
|
||||
{
|
||||
if (event->error_code == BadDrawable || event->error_code == BadGC) return TRUE;
|
||||
#ifdef HAVE_X11_EXTENSIONS_XRENDER_H
|
||||
if (xrender_error_base) /* check for XRender errors */
|
||||
{
|
||||
if (event->error_code == xrender_error_base + BadPicture) return TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
|
|||
*/
|
||||
void X11DRV_XRender_Init(void)
|
||||
{
|
||||
int error_base, event_base, i;
|
||||
int event_base, i;
|
||||
XRenderPictFormat pf;
|
||||
|
||||
if (client_side_with_render &&
|
||||
|
@ -200,9 +200,9 @@ LOAD_OPTIONAL_FUNCPTR(XRenderSetPictureTransform)
|
|||
|
||||
|
||||
wine_tsx11_lock();
|
||||
if(pXRenderQueryExtension(gdi_display, &event_base, &error_base)) {
|
||||
if(pXRenderQueryExtension(gdi_display, &event_base, &xrender_error_base)) {
|
||||
X11DRV_XRender_Installed = TRUE;
|
||||
TRACE("Xrender is up and running error_base = %d\n", error_base);
|
||||
TRACE("Xrender is up and running error_base = %d\n", xrender_error_base);
|
||||
screen_format = pXRenderFindVisualFormat(gdi_display, visual);
|
||||
if(!screen_format)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue