Merge remote-tracking branch 'jeremyhu/master'
This commit is contained in:
commit
7722bcbab2
|
@ -64,6 +64,7 @@
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
#include "mipointer.h"
|
#include "mipointer.h"
|
||||||
#include "rootless.h"
|
#include "rootless.h"
|
||||||
|
#include "rootlessCommon.h"
|
||||||
#include "x-hash.h"
|
#include "x-hash.h"
|
||||||
#include "x-hook.h"
|
#include "x-hook.h"
|
||||||
#include "driWrap.h"
|
#include "driWrap.h"
|
||||||
|
@ -380,6 +381,11 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
|
||||||
DRIDrawablePrivPtr pDRIDrawablePriv;
|
DRIDrawablePrivPtr pDRIDrawablePriv;
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||||
|
/* <rdar://problem/12338921>
|
||||||
|
* http://bugs.winehq.org/show_bug.cgi?id=31751
|
||||||
|
*/
|
||||||
|
RootlessStopDrawing((WindowPtr)pDrawable, FALSE);
|
||||||
|
|
||||||
pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
|
pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
|
||||||
(WindowPtr)pDrawable, &wid);
|
(WindowPtr)pDrawable, &wid);
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
#include <execinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFINE_ATOM_HELPER(func, atom_name) \
|
#define DEFINE_ATOM_HELPER(func, atom_name) \
|
||||||
static Atom func(void) { \
|
static Atom func(void) { \
|
||||||
static int generation; \
|
static int generation; \
|
||||||
|
@ -376,6 +380,18 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
|
||||||
unsigned int rowbytes[2];
|
unsigned int rowbytes[2];
|
||||||
xp_error err;
|
xp_error err;
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
void* callstack[128];
|
||||||
|
int i, frames = backtrace(callstack, 128);
|
||||||
|
char** strs = backtrace_symbols(callstack, frames);
|
||||||
|
|
||||||
|
ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
|
||||||
|
for (i = 0; i < frames; ++i) {
|
||||||
|
ErrorF(" %s\n", strs[i]);
|
||||||
|
}
|
||||||
|
free(strs);
|
||||||
|
#endif
|
||||||
|
|
||||||
err = xp_lock_window(x_cvt_vptr_to_uint(
|
err = xp_lock_window(x_cvt_vptr_to_uint(
|
||||||
wid), NULL, NULL, data, rowbytes, NULL);
|
wid), NULL, NULL, data, rowbytes, NULL);
|
||||||
if (err != Success)
|
if (err != Success)
|
||||||
|
@ -395,6 +411,18 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
|
||||||
{
|
{
|
||||||
xp_error err;
|
xp_error err;
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
void* callstack[128];
|
||||||
|
int i, frames = backtrace(callstack, 128);
|
||||||
|
char** strs = backtrace_symbols(callstack, frames);
|
||||||
|
|
||||||
|
ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
|
||||||
|
for (i = 0; i < frames; ++i) {
|
||||||
|
ErrorF(" %s\n", strs[i]);
|
||||||
|
}
|
||||||
|
free(strs);
|
||||||
|
#endif
|
||||||
|
|
||||||
err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
|
err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
|
||||||
/* This should be a FatalError, but we started tripping over it. Make it a
|
/* This should be a FatalError, but we started tripping over it. Make it a
|
||||||
* FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
|
* FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
|
||||||
|
|
Loading…
Reference in New Issue