Darwin: More syncing witn xorg-server-1.2-apple
This commit is contained in:
parent
4e18c62635
commit
23596291c3
|
@ -671,6 +671,7 @@ void OsVendorInit(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
// DEBUG_LOG("Xquartz started at %s\n", ctime(time(NULL)));
|
||||||
|
|
||||||
// Find the full path to the keymapping file.
|
// Find the full path to the keymapping file.
|
||||||
if ( darwinKeymapFile ) {
|
if ( darwinKeymapFile ) {
|
||||||
|
@ -959,7 +960,7 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = TRUE;
|
Bool anyMarked = TRUE;
|
||||||
RegionPtr pOldClip = NULL;
|
RegionPtr pOldClip = NULL, bsExposed;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1015,6 +1016,12 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
|
|
||||||
if (WasViewable)
|
if (WasViewable)
|
||||||
{
|
{
|
||||||
|
if (pWin->backStorage)
|
||||||
|
{
|
||||||
|
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||||
|
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||||
|
}
|
||||||
|
|
||||||
if (pWin->firstChild)
|
if (pWin->firstChild)
|
||||||
{
|
{
|
||||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
||||||
|
@ -1038,6 +1045,28 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
|
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pWin->backStorage &&
|
||||||
|
((pWin->backingStore == Always) || WasViewable))
|
||||||
|
{
|
||||||
|
if (!WasViewable)
|
||||||
|
pOldClip = &pWin->clipList; /* a convenient empty region */
|
||||||
|
bsExposed = (*pScreen->TranslateBackingStore)
|
||||||
|
(pWin, 0, 0, pOldClip,
|
||||||
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
|
if (WasViewable)
|
||||||
|
REGION_DESTROY(pScreen, pOldClip);
|
||||||
|
if (bsExposed)
|
||||||
|
{
|
||||||
|
RegionPtr valExposed = NullRegion;
|
||||||
|
|
||||||
|
if (pWin->valdata)
|
||||||
|
valExposed = &pWin->valdata->after.exposed;
|
||||||
|
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||||
|
if (valExposed)
|
||||||
|
REGION_EMPTY(pScreen, valExposed);
|
||||||
|
REGION_DESTROY(pScreen, bsExposed);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (WasViewable)
|
if (WasViewable)
|
||||||
{
|
{
|
||||||
if (anyMarked)
|
if (anyMarked)
|
||||||
|
|
|
@ -253,7 +253,7 @@ static void QuartzUpdateScreens(void)
|
||||||
int x, y, width, height, sx, sy;
|
int x, y, width, height, sx, sy;
|
||||||
xEvent e;
|
xEvent e;
|
||||||
|
|
||||||
ErrorF("QuartzUpdateScreens()\n");
|
DEBUG_LOG("QuartzUpdateScreens()\n");
|
||||||
if (noPseudoramiXExtension || screenInfo.numScreens != 1)
|
if (noPseudoramiXExtension || screenInfo.numScreens != 1)
|
||||||
{
|
{
|
||||||
/* FIXME: if not using Xinerama, we have multiple screens, and
|
/* FIXME: if not using Xinerama, we have multiple screens, and
|
||||||
|
@ -418,6 +418,7 @@ void DarwinModeProcessEvent(
|
||||||
{
|
{
|
||||||
switch (xe->u.u.type) {
|
switch (xe->u.u.type) {
|
||||||
case kXDarwinControllerNotify:
|
case kXDarwinControllerNotify:
|
||||||
|
DEBUG_LOG("kXDarwinControllerNotify\n");
|
||||||
AppleWMSendEvent(AppleWMControllerNotify,
|
AppleWMSendEvent(AppleWMControllerNotify,
|
||||||
AppleWMControllerNotifyMask,
|
AppleWMControllerNotifyMask,
|
||||||
xe->u.clientMessage.u.l.longs0,
|
xe->u.clientMessage.u.l.longs0,
|
||||||
|
@ -425,6 +426,7 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinPasteboardNotify:
|
case kXDarwinPasteboardNotify:
|
||||||
|
DEBUG_LOG("kXDarwinPasteboardNotify\n");
|
||||||
AppleWMSendEvent(AppleWMPasteboardNotify,
|
AppleWMSendEvent(AppleWMPasteboardNotify,
|
||||||
AppleWMPasteboardNotifyMask,
|
AppleWMPasteboardNotifyMask,
|
||||||
xe->u.clientMessage.u.l.longs0,
|
xe->u.clientMessage.u.l.longs0,
|
||||||
|
@ -432,7 +434,7 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinActivate:
|
case kXDarwinActivate:
|
||||||
// ErrorF("kXDarwinActivate\n");
|
DEBUG_LOG("kXDarwinActivate\n");
|
||||||
QuartzShow(xe->u.keyButtonPointer.rootX,
|
QuartzShow(xe->u.keyButtonPointer.rootX,
|
||||||
xe->u.keyButtonPointer.rootY);
|
xe->u.keyButtonPointer.rootY);
|
||||||
AppleWMSendEvent(AppleWMActivationNotify,
|
AppleWMSendEvent(AppleWMActivationNotify,
|
||||||
|
@ -441,7 +443,7 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinDeactivate:
|
case kXDarwinDeactivate:
|
||||||
// ErrorF("kXDarwinDeactivate\n");
|
DEBUG_LOG("kXDarwinDeactivate\n");
|
||||||
AppleWMSendEvent(AppleWMActivationNotify,
|
AppleWMSendEvent(AppleWMActivationNotify,
|
||||||
AppleWMActivationNotifyMask,
|
AppleWMActivationNotifyMask,
|
||||||
AppleWMIsInactive, 0);
|
AppleWMIsInactive, 0);
|
||||||
|
@ -449,22 +451,23 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinDisplayChanged:
|
case kXDarwinDisplayChanged:
|
||||||
// ErrorF("kXDarwinDisplayChanged\n");
|
DEBUG_LOG("kXDarwinDisplayChanged\n");
|
||||||
QuartzUpdateScreens();
|
QuartzUpdateScreens();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinWindowState:
|
case kXDarwinWindowState:
|
||||||
// ErrorF("kXDarwinWindowState\n");
|
DEBUG_LOG("kXDarwinWindowState\n");
|
||||||
RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
|
RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
|
||||||
xe->u.clientMessage.u.l.longs1);
|
xe->u.clientMessage.u.l.longs1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinWindowMoved:
|
case kXDarwinWindowMoved:
|
||||||
// ErrorF("kXDarwinWindowMoved\n");
|
DEBUG_LOG("kXDarwinWindowMoved\n");
|
||||||
RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0);
|
RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinToggleFullscreen:
|
case kXDarwinToggleFullscreen:
|
||||||
|
DEBUG_LOG("kXDarwinToggleFullscreen\n");
|
||||||
#ifdef DARWIN_DDX_MISSING
|
#ifdef DARWIN_DDX_MISSING
|
||||||
if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
|
if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
|
||||||
else if (quartzHasRoot) QuartzHide();
|
else if (quartzHasRoot) QuartzHide();
|
||||||
|
@ -500,7 +503,7 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinBringAllToFront:
|
case kXDarwinBringAllToFront:
|
||||||
// ErrorF("kXDarwinBringAllToFront\n");
|
DEBUG_LOG("kXDarwinBringAllToFront\n");
|
||||||
RootlessOrderAllWindows();
|
RootlessOrderAllWindows();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -80,21 +80,14 @@ eventHandler(unsigned int type, const void *arg,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XP_EVENT_WINDOW_MOVED:
|
case XP_EVENT_WINDOW_MOVED:
|
||||||
DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
|
DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
|
||||||
if (arg_size == sizeof(xp_window_id))
|
if (arg_size == sizeof(xp_window_id)) {
|
||||||
{
|
xp_window_id id = * (xp_window_id *) arg;
|
||||||
xp_window_id id = * (xp_window_id *) arg;
|
WindowPtr pWin = xprGetXWindow(id);
|
||||||
WindowPtr pWin = xprGetXWindow(id);
|
QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
|
||||||
BoxRec box;
|
}
|
||||||
xp_error retval = xp_get_window_bounds(id, &box);
|
break;
|
||||||
if (retval != Success) {
|
|
||||||
ErrorF("Unable to find new bounds for window\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case XP_EVENT_SURFACE_DESTROYED:
|
case XP_EVENT_SURFACE_DESTROYED:
|
||||||
DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
|
DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
|
||||||
case XP_EVENT_SURFACE_CHANGED:
|
case XP_EVENT_SURFACE_CHANGED:
|
||||||
|
|
Loading…
Reference in New Issue