[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: QXEmbed reparent patch
From: George Staikos <staikos () kde ! org>
Date: 2002-07-15 1:09:51
[Download RAW message or body]
On July 14, 2002 21:06, Dirk Mueller wrote:
> On Son, 14 Jul 2002, staikos George Staikos wrote:
> > It already had a call to that in the code. (look at the patch and you
> > will see it) Perhaps it was in the wrong place though?
>
> There's only a flush before the XReparent call. I see no sync there.
Have a look at the last line. :)
Is this the wrong place? Should it be relocated?
@@ -616,8 +648,20 @@ void QXEmbed::embed(WId w)
QApplication::flushX();
while (!wstate_withdrawn(window))
;
+ }
+ Window parent;
+ get_parent(w, &parent);
+ kdDebug() << QString(">>> before reparent: parent=0x%1").arg(parent,
0, 16) << endl;
+ for (int i = 0; i < 50; i++) {
+ Window parent = 0;
+ XReparentWindow(qt_xdisplay(), w, winId(), 0, 0);
+ if (get_parent(w, &parent) && parent == winId()) {
+ kdDebug() << QString(">>> Loop %1: reparent of 0x%2 into 0x%3
successful").arg(i).arg(w, 0, 16).arg(winId(), 0, 16) << endl;
+ break;
+ }
+ kdDebug() << QString(">>> Loop %1: reparent of 0x%2 into 0x%3
failed").arg(i).arg(w, 0, 16).arg(winId(), 0, 16) << endl;
+ USLEEP(1000);
}
- XReparentWindow(qt_xdisplay(), w, winId(), 0, 0);
QApplication::syncX();
--
George Staikos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic