summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian.Ehrlicher <Ch.Ehrlicher@gmx.de>2010-12-10 16:41:42 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-12-10 16:41:42 (GMT)
commit9fe927a54f0c465c0dcbcc5790ad0ddb17d4cc18 (patch)
tree73e9b8c5bc7f7bd66a82314b94276cf0235f4507
parent35a6b31320104e90f584dc7ba528bd9ed05b8676 (diff)
downloadQt-9fe927a54f0c465c0dcbcc5790ad0ddb17d4cc18.zip
Qt-9fe927a54f0c465c0dcbcc5790ad0ddb17d4cc18.tar.gz
Qt-9fe927a54f0c465c0dcbcc5790ad0ddb17d4cc18.tar.bz2
Proposed fix for QTBUG-10499
Merge-request: 866 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index e6e3bfb..f2f95d3 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -512,7 +512,7 @@ QX11EmbedWidget::~QX11EmbedWidget()
<< "from container with winId" << d->container;
#endif
XUnmapWindow(x11Info().display(), internalWinId());
- XReparentWindow(x11Info().display(), internalWinId(), x11Info().appRootWindow(), 0, 0);
+ XReparentWindow(x11Info().display(), internalWinId(), x11Info().appRootWindow(x11Info().screen()), 0, 0);
}
#ifdef QX11EMBED_DEBUG
@@ -791,13 +791,13 @@ bool QX11EmbedWidget::x11Event(XEvent *event)
qDebug() << "QX11EmbedWidget::x11Event: client"
<< (void *)this << "with winId" << winId()
<< "received a ReparentNotify to"
- << ((event->xreparent.parent == x11Info().appRootWindow())
+ << ((event->xreparent.parent == x11Info().appRootWindow(x11Info().screen()))
? QString::fromLatin1("root") : QString::number(event->xreparent.parent));
#endif
// If the container shuts down, we will be reparented to the
// root window. We must also consider the case that we may be
// reparented from one container to another.
- if (event->xreparent.parent == x11Info().appRootWindow()) {
+ if (event->xreparent.parent == x11Info().appRootWindow(x11Info().screen())) {
if (((QHackWidget *)this)->topData()->embedded) {
d->container = 0;
emit containerClosed();
@@ -1115,7 +1115,7 @@ QX11EmbedContainer::~QX11EmbedContainer()
Q_D(QX11EmbedContainer);
if (d->client) {
XUnmapWindow(x11Info().display(), d->client);
- XReparentWindow(x11Info().display(), d->client, x11Info().appRootWindow(), 0, 0);
+ XReparentWindow(x11Info().display(), d->client, x11Info().appRootWindow(x11Info().screen()), 0, 0);
}
if (d->xgrab)
@@ -1379,7 +1379,7 @@ bool QX11EmbedContainer::eventFilter(QObject *o, QEvent *event)
// Wait until the messages have been processed. Then ask
// the window manager to delete the window.
XUnmapWindow(x11Info().display(), d->client);
- XReparentWindow(x11Info().display(), d->client, x11Info().appRootWindow(), 0, 0);
+ XReparentWindow(x11Info().display(), d->client, x11Info().appRootWindow(x11Info().screen()), 0, 0);
XSync(x11Info().display(), false);
XEvent ev;
@@ -1627,7 +1627,7 @@ void QX11EmbedContainerPrivate::rejectClient(WId window)
Q_Q(QX11EmbedContainer);
q->setEnabled(false);
XRemoveFromSaveSet(q->x11Info().display(), client);
- XReparentWindow(q->x11Info().display(), window, q->x11Info().appRootWindow(), 0, 0);
+ XReparentWindow(q->x11Info().display(), window, q->x11Info().appRootWindow(q->x11Info().screen()), 0, 0);
}
/*! \internal