summaryrefslogtreecommitdiff
path: root/miext/rootless
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-08 16:59:56 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-08 16:59:56 -0700
commitdf21312c8b0e9ef0c809bfc57cdf64f27db0d8a7 (patch)
tree76dac0e513202713d42c14d7741fcb22c119c200 /miext/rootless
parentc95170f23ccf4de60cb3dd5f9c64f1d561bf30d5 (diff)
XQuartz: Fix issue where clicking on an X11 window might send that event to an X11 window in another space.
(cherry picked from commit 2e78818232314908a73113b1d46c2420d9d4fcbf)
Diffstat (limited to 'miext/rootless')
-rw-r--r--miext/rootless/rootlessWindow.c14
-rw-r--r--miext/rootless/rootlessWindow.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index bf0380f73..453f7d1f0 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -117,12 +117,10 @@ rootlessHasRoot (ScreenPtr pScreen)
}
void
-RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state)
+RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
{
- WindowPtr pWin;
RootlessWindowRec *winRec;
- pWin = xprGetXWindow (id);
if (pWin == NULL) return;
winRec = WINREC (pWin);
@@ -130,7 +128,7 @@ RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state)
winRec->is_offscreen = ((state & XP_WINDOW_STATE_OFFSCREEN) != 0);
winRec->is_obscured = ((state & XP_WINDOW_STATE_OBSCURED) != 0);
- // pWin->rootlessUnhittable = winRec->is_offscreen;
+ pWin->rootlessUnhittable = winRec->is_offscreen;
}
void
@@ -143,7 +141,7 @@ RootlessNativeWindowMoved (WindowPtr pWin)
ClientPtr client;
RootlessWindowRec *winRec = WINREC(pWin);
- if (xp_get_window_bounds (winRec->wid, &bounds) != Success) return;
+ if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return;
sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
@@ -1428,6 +1426,10 @@ RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
pTopWin = TopLevelParent(pWin);
assert(pTopWin != pWin);
+
+ pWin->rootlessUnhittable = FALSE;
+
+ DeleteProperty (pWin, xa_native_window_id ());
if (WINREC(pTopWin) != NULL) {
/* We're screwed. */
@@ -1484,7 +1486,7 @@ RootlessFlushWindowColormap (WindowPtr pWin)
wc.colormap = RootlessColormapCallback;
wc.colormap_data = pWin->drawable.pScreen;
- configure_window (winRec->wid, XP_COLORMAP, &wc);
+ configure_window ((xp_window_id)winRec->wid, XP_COLORMAP, &wc);
}
/*
diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h
index ad876e53f..3bdb3bd19 100644
--- a/miext/rootless/rootlessWindow.h
+++ b/miext/rootless/rootlessWindow.h
@@ -36,8 +36,6 @@
#include "rootlessCommon.h"
-#include <Xplugin.h>
-
Bool RootlessCreateWindow(WindowPtr pWin);
Bool RootlessDestroyWindow(WindowPtr pWin);
@@ -61,6 +59,6 @@ void RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
int what);
void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width);
void RootlessNativeWindowMoved (WindowPtr pWin);
-void RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state);
+void RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state);
#endif