From kde-optimize Tue Feb 04 12:42:04 2003 From: Lubos Lunak Date: Tue, 04 Feb 2003 12:42:04 +0000 To: kde-optimize Subject: Re: Drag and drop optimization X-MARC-Message: https://marc.info/?l=kde-optimize&m=104436264227170 On Tuesday 04 of February 2003 13:31, Waldo Bastian wrote: > On Tuesday 04 February 2003 13:08, Lubos Lunak wrote: > > One more thing to do could be to have larger > > 'sameanswer' area (see the XDND spec), but I'm afraid that wouldn't be > > that trivial in Qt. > > For kicker I commited the following: > - if (QUriDrag::canDecode(ev)) > - ev->accept(rect()); > + if ((ev->source() != this) && QUriDrag::canDecode(ev)) > + ev->accept(rect()); > + else > + ev->ignore(rect()); > > Which disables dragging an item onto itself and sets an ignore-area. > > The latter should set the 'sameanswer' area, is that what you mean? See http://www.newplanetsoftware.com/xdnd/ , section 'Client messages', description of 'XdndStatus'. The 'sameanswer' area is a rectangle where it doesn't make sense to send additional move events, because ... well, the answer from that area will be always the same. Sounds simple, but getting it from Qt widgets may not be as easy. > > If that helps we might want to scan KDE source for this kind of usage and > set appropriate acceopt/ignore rects. I actually don't find that necessary and worth it. Would you be really that happier to see that DND operations take only let's say 10% CPU instead of 100% for the short amount of time you do the DND operation? That of course depends on whether the patches really help on slower machines. -- Lubos Lunak KDE developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz/ _______________________________________________ Kde-optimize mailing list Kde-optimize@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-optimize