Drag and drop optimization
Wilco Greven
kde-optimize@mail.kde.org
Wed, 5 Feb 2003 15:11:58 +0100
On Wednesday 05 February 2003 13:27, Lubos Lunak wrote:
> On Tuesday 04 of February 2003 22:36, Wilco Greven wrote:
> > On Tuesday 04 February 2003 13:08, Lubos Lunak wrote:
>
> [snip]
>
> > I tried out your patch. At first it didn't seem to be any better than the
> > old situation. I could be that the first part (the hole patch), doesn't
> > work as expected. Maybe Enter/Leave events are to blame in this case.
>
> I actually left some of the debug comments in the patch. The 'AVOIDING'
> message lists number of avoided calls to QDragManager::move(). The 'TAR:'
> message lists results of finding the window under the cursor, and with the
> hole in the pixmap, the third number should never be the same as one of the
> first two (and it's not here). Can you check that?
The first is sometimes the same as the third:
TAR: 0x4600001 0x4600001 0x46003e3
TAR: 0x46003e3 0x0 0x46003e3
AVOIDING 310
AVOIDING 311
AVOIDING 312
TAR: 0x4600001 0x4600001 0x46003e3
AVOIDING 313
TAR: 0x46003e3 0x0 0x46003e3
AVOIDING 314
AVOIDING 315
TAR: 0x4600001 0x4600001 0x46003e3
Can XMoveResizeWindow somehow not have an immediate effect in certain cases?
> [...]
>
> What's your HW configuration exactly?
K6-2/550, 320 Mb, Voodoo3 2000. So it's not that bad. But KDE runs much
smoother on the athlon 700 of my parents.
> But if it happens exactly as you describe above, then either the spec has a
> flaw or the Qt implementation is flawed.
My guess is that Qt is wrong here. As far as I can tell, the source could
simply wait for a XdndStatus message from the target before doing the drop.
The relevant part (?) of the spec says the following about it:
"If the source doesn't receive the expected XdndStatus within a reasonable
amount of time, it should send XdndLeave. While waiting for XdndStatus, the
source can block, but it must at least process SelectionRequest events so the
target can examine the data."
If I understand this correctly, it also means that the source also has to wait
for a reasonable amount of time for XdndStatus, before doing the drop.
--
Greetings,
Wilco.