Darwin: Initial support for Spaces -- if you use Expose to drag an X11
window to another Space, it will work correctly (as opposed
to just leaving a ghost window). We accomplish this by listening
for the notification from Xplugin that our window has been moved,
and then we ask X11 to move the window to the new location.
(cherry picked from commit 2d50ea8013
)
This commit is contained in:
parent
b39edc01a6
commit
01b70afaac
|
@ -426,6 +426,18 @@ void DarwinModeProcessEvent(
|
|||
RootlessOrderAllWindows();
|
||||
break;
|
||||
|
||||
case kXDarwinWindowState:
|
||||
ErrorF("kXDarwinWindowState\n");
|
||||
break;
|
||||
case kXDarwinWindowMoved: {
|
||||
WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
|
||||
short x = xe->u.clientMessage.u.l.longs1,
|
||||
y = xe->u.clientMessage.u.l.longs2;
|
||||
ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
|
||||
RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorF("Unknown application defined event type %d.\n", xe->u.u.type);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,13 @@ eventHandler(unsigned int type, const void *arg,
|
|||
{
|
||||
xp_window_id id = * (xp_window_id *) arg;
|
||||
WindowPtr pWin = xprGetXWindow(id);
|
||||
QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
|
||||
BoxRec box;
|
||||
xp_error retval = xp_get_window_bounds(id, &box);
|
||||
if (retval != Success) {
|
||||
ErrorF("Unable to find new bounds for window\n");
|
||||
break;
|
||||
}
|
||||
QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user