--===============0909650756== Content-Type: multipart/signed; boundary="nextPart1777729.M7nIGMcocg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1777729.M7nIGMcocg Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Friday, December 31, 2010, J Janz wrote: > Also, if I got it right from your answer, I still couldn't make it right > now even with a DataEngine/Service, because I wouldn't have a widget, > right? there are probably a number of ways to do it; right now with the tooltip=20 widgets the window manager paints the thumbnail there directly within the=20 coordinates given since it already has the pixmap available and knows when = to=20 update it. with a plasmoid, it is possible to find every view (which is a QWidget) tha= t=20 displaying that plasmoid and map the coordinates of the plasmoid to the=20 coordinates of that widget (and then to global screen coordinates). that's = not=20 very hard at all. in fact, the plasmoid itself can knows it geometry in sce= ne=20 coordinates with QGraphicsItem::mapToScene(..). this returns a QPolygonF,=20 since the item may be transformed on the screen. with that region, it is then easy enough to find out what the screen=20 coordinates are based on the view's offset onto the scene (mapFromScene(..)= )=20 and where the view is on screen (getting the bounding rect of the region an= d=20 using QWidget::mapToGlobal(..)) to support rotation, kwin would also need to know what the rotation in=20 QGraphicsItem::transorm() is so it knows which way the polygon is oriented.= =20 with that info, kwin should be able to paint thumbails pretty much anywhere= =20 requested. right now, without touching kwin, only non-rotated thumbnails are possible.= =20 that would be a useful start, though, and once that is working we can add=20 rotation to kwin's thumbnail painting perhaps. kwin's thumbnail painting is triggered using=20 Plasma::WindowEffects::showWindowThumbnails. what isn't good in there right= =20 now is that it sets an X atom on the window, meaning that only one set of=20 window thubnails per view would currently be painted. so two copies of your= =20 plasmoid on the same containment wouldn't work right now; that would need s= ome=20 work, but that is, again, another improvement that could be made once the=20 basics are working. so to start with, a Service in the Tasks DataEngine which uses=20 Plasma::WindowEffects to get thumbnails for a window onto a given screen co= ord=20 should be enough to get this started. =2D-=20 Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Development Frameworks --nextPart1777729.M7nIGMcocg Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iEYEABECAAYFAk0eV4AACgkQ1rcusafx20N4pwCeP7hYzALYk6emyTPSXqU51QlP GUEAoJGbuMCy3A7qni2F0T2OLR+IkMtG =K+rD -----END PGP SIGNATURE----- --nextPart1777729.M7nIGMcocg-- --===============0909650756== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0909650756==--