How to recognize a revolution

The most recurrent and difficult question I get, and probably the most recurrent in the industry is how’s the world gonna look like in 5 years? What’s the next big thing?. My usual answer is “if I knew, I’ll be doing that” (and that’s probably what’s happening :)) but the point is that the horizon of predictions in this fast paced internet era is too close to us.

Two years and 6 months ago the first, rudimental and slow Android device was born. If feels like prehistory now, and it’s just 2 years ago.. then the DROIDs came, then the Galaxys, and you can see their impact on the world in this beautiful video:

Do you see how quickly this is happening? What’s in your face IS a revolution, because when you buy one of them, you don’t just get a brilliant colorful expensive eye-catching plastic toy.

What you buy is the sense of protection, for not feeling lost when travelling though neighborhoods or new cities, for always having friends within reach and multiple ways of communicating with them, for always knowing which is the closest+cheapest+healthiest+toprated Korean place, and when you are looking at your calendar and you arrive perfectly on time at that very important meeting you’ll even feel like a better person (well, this applies just to me, and few other Italians :).

Talking about the revolution, do you see it now?

KDE 3 on “The Social Network” movie

Well.. I admit that I felt a little proud after seeing the good old KDE3 on the trailer of the upcoming “The Social Network“.

For those who didn’t see it, here it is:
KDE3 on the trailer

This is a KDE desktop with:

  • the Keramic widget and window decoration style (so it’s at least a KDE 3.1, released on Jan 2003)
  • a konqueror window (god, I loved that browser) showing the /home/mark directory (obviously Mark Zuckerberg)
  • a terminal, probably xterm, showing some wget-ting going on to fetch the pictures displayed in the other konqueror window
  • a mozilla window displaying the URL, probably something like the directory of the house

Apart from that it all looks very standard to me.. do you see any other customization/hint on the picture?
Come on, unleash your CSI skills!! ;-)

I remember it was KDE 3.2 that made me fall in love with this awesome desktop environment (it was really the top of the class at that point, with konqueror, the kio slaves, and a browser that was about to change the history) and my first opensource code commit was about 6 years and 8 months ago.. and I enjoyed every second of that. (and now it pays the bills too! lol)

Well… looks like I’ll be at the movies on Oct 1st!

Delicious Transblurency [1]

The ‘focus‘ word has many meanings, ranging from the optical concept of ‘good convergence of light rays generated by an object’ to the cognitive process of directing the attention to a particular target while ignoring other targets.
Now the interesting part: this concept can be used in computers too, especially in user interfaces, to direct the user to relevant information or to help him through a step-by-step process. How to do that? Since every image you see on screen is ‘on focus’ by default, you can easily unfocus unuseful information.

Blurring is the act of altering images so they appear out of focus. My Maestro[2] and other illustriuos people already talked extensively about this topic here on planet KDE. However you don’t improve the world until a technology becomes available to everybody, right?

Then some days ago I read on notmart‘s blog that plasma and kwin supported blurring the background on windows.. so I rebuilt KDE4 svn, restarted it, and… boy.. does it make a difference! Look at Marco’s blog or at this picture I stole from him! All the popups become instantly more readable, even krunner does, and you immediately get the feeling that the plasma panel and all the systray applets really are above your desktop and they look as they were made of some glass/plastic material.

So: why limiting this just to some plasma applets? Well, I think that the usage of this effect must be wise, however I wanted that for my app too…

…’cause I like eye-candy! ;-)

After a quick tour through the beautiful KDE svn I grabbed all the needed source code and loaded Fotowall in creator. Since I already had the structure for the blur-behind on windows in place, adding the KDE4 effect was really easy. Here are some samples of what you can get:

Fotowall using KWin's new Blur effect.

To activate the back blur you need:

  • obviously an application with a transparent background. Qt easily allows to work with transparency on top-level windows.
  • you have to enable the “blur” effect in kwin’s “desktop effects” configuration.
  • a couple of lines of code to ask kwin to activate blurring to your window.

Here is the code that does the magic:

#if defined(Q_WS_X11)
  Blur behind windows (on KDE4.5+)
  Uses a feature done for Plasma 4.5+ for hinting the window manager to draw
  blur behind the window.
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <QX11Info>
static bool kde4EnableBlurBehindWindow(WId window, bool enable, const QRegion &region = QRegion())
    Display *dpy = QX11Info::display();
    Atom atom = XInternAtom(dpy, "_KDE_NET_WM_BLUR_BEHIND_REGION", False);

    if (enable) {
        QVector<QRect> rects = region.rects();
        QVector<quint32> data;
        for (int i = 0; i < rects.count(); i++) {
            const QRect r = rects[i];
            data << r.x() << r.y() << r.width() << r.height();

        XChangeProperty(dpy, window, atom, XA_CARDINAL, 32, PropModeReplace,
                        reinterpret_cast<const unsigned char *>(data.constData()), data.size());
    } else {
        XDeleteProperty(dpy, window, atom);

And then you can activate the blur on the caller widget with:

    kde4EnableBlurBehindWindow(winId(), true);

You could add the back blur to your application too, however I advise you that the interface is not standardized, so don’t blame either me or the kwin authors if something changes. Here is another picture, because everybody loves them ;-)

Another back-blurred screen in Fotowall.

And now, as a side note, a picture from my new work place: the beautiful city of San Diego, blessed by the sun and by a ton of great programmers that by some chance happen to be co-workers of me ;-) With all the blue sky and long days, I can’t imagine a more inspiring place for making new blog posts and code experiments!

[1] obviously the name is completely made up ;-)
[2] Italian word meaning “teacher” as in school or life teacher

Grab one, it’s free!

As promised, here is a list of some KDE ideas that the people left in my previous post, along as mine. They’re available for free, so feel free to pick one and make it yours ;-) As a side note, I’m making a KDE Prediction for 2010: KDM will receive lots of love! You can see that the stars are aligning. In fact I’m going to split this post into 2 ideas scenarios to reflect that.

KDM Ideas

  1. QML in KDM
    This is all about animations, user interaction and eye candy. See this for example.
  2. Plasma in KDM
    This is about consistence and configurability.
  3. Webcam Login (face recognition) in KDM
    Show your face (or Mona Lisa‘s one) and you’re in! No password typing needed. Integrating with the pam-face-authentication may be the smart way to go.
  4. Fingerprint Login in KDM
    This is KDE’s most requested feature… you can’t be wrong implementing it ;-)

KDE Ideas

  1. Unified webcam library
    Webcam’s are being utilized a lot lately: they’re cheap, widespread, and they’re working good under Linux. Projects come out with webcam support, like Fotowall, Kamoso, Kopete and there are efforts to get it working in Phonon.
    Note that a camera is a source of video, images but also can be used for authentication and may even be used for user input – can you imagine manipulating stuff with your fingers? Note that webcams must usually be read in single instance, so the approach here might be 1 Qt-Only userspace daemon supporting multiple connections.
  2. Unified Theme Manager
    One theme manager to rule them all: styles, colors, plasma theme, windeco & all. Of course the themes must be packed and shared in a binary-compatible manner with any other KDE system (yes, the challenges are there.. ;-)
  3. Unified Configuration Panel
    Making systemsettings really the one and only configuration tool and provide backends to the distributions for adding/changing modules so KDE systems will have the same feeling for configuring the system. Some modules like ‘partition disk’, ‘edit boot menu’ and ‘manage startup programs’ (daemons) should be added and left to the distribution for implementation – I think they will. Note that current systemsettings lets you configure the joystick even if you don’t have one (!).
  4. KWIN: draggable windows
    And for windows I mean (actually J. Janz means) the whole non-interactive panel. Blank space as well as inactive labels should be draggable. From the user POV there is no window-deco + window contents. It’s a panel, let’s use it, move it, resize it, context-menu-it as a whole.
  5. Raytraced UI
    I’ll blog more about this, but this is a little thing I’d really like to do but I don’t know if I will find time to do that. Do you think that iPhone gui is cool? Raytrace the .ui high-level gui definition format and you’ll get something better. Glassy too. Mail me if you want to know more about this ;-)


I’m sorry I missed some interesting suggestions but I don’t have space here to detail them; just look to my previous blog entry’s comments to find more about BasKet note pads integration into Plasma, file browsing enhancements (context dependent actions, menus, warnings and kparts) qt4 gui for vi, etc.

As someone pointed out there is quite a bit of overlap and dispersion between the ways to collect ideas. I can count:

Directing users to provide their feedback in a low-dispersive, constructive, modern, layered (from generic directions to specific actions) and focused way is probably one of the challenges that should be added to Aaron’s list for 2010.

Gift a cool idea!

You often think “this KDE idea of mine would kick ass” but then you don’t have time to implement it and finally you forget about it? Welcome to the club!

Collecting Ideas

I want to blog about some cool things to do for the KDE project on week-1 2010. I’ve got just a couple of good ideas, so I’m asking you to add your ideas so we can make a good collection of nice things to do. You can either reply to this post (don’t be shy, just post it!) or send it to me at <>.

Sharing your idea with the community raises the chance of seeing it implemented! ;-)

QML to KDM! Presto!!

I’m really surprised you’re still reading, since the title really explains it all.. but for you, my beloved reader, I’ll spend some words more.

The KDE login Manager

The login manager is the “insert password” dialog that gets in the way when you want to use your computer. Of course you may not be the only user of the machine, so it’s somewhat needed when you share the seat. Some facts:
  • the honorable Stephan ‘coolo’ Kulow landed it in cvs Sept 2nd 1997 (yes, that’s 12 years ago)
  • great people like Waldo Bastian and David Faure worked on it
  • it’s now maintained by the über-expert Oswald ‘ossi’ Buddenhagent
  • I did the graphical themes support, implementing the GDM themes spec back in the KDE3 days
  • “The first thing you’ll notice about the new KDE 4 is it’s old login manager” – as David Vignoni says in his controversial blog entry,

The funny thing is: 1 year from now Win7 and MacOS will stare at KDM with envy!! Read on to know the future history.

Kdm Top to Bottom

Let’s say that KDM rocks ‘backend-wise’: multiple-seats, integration with running sessions, XDMCP and all the other stuff that makes kdm the top of the class. But what do you find in $SVN/KDE/kdebase/workspace/kdm ?
  • backend/* -> the display management core
  • kfrontend/*.{cpp,h} -> 90′s GUI, there is even an aliased analog clock..
  • kfrontend/themer/* -> graphical themes stuff (just 2243 source lines of code)
The themer, which is used by default, implemented the gdm theming specs but it was never package-compatible (afaik) with gdm (we lost a good inter-op chance there). It was implemented in the KDE3 days, so we had to code our ‘backing storage’ to implement transparency between layers and in the end the themes are hand-written xml files that embed some default components (line-edits for user/pass insertion, listview for user list, etc).
It looks so old-style, doesn’t it?

Qml to the rescue!

What if we throw away (or keep for “retro-compatibility”) the classic and themer frontends and just add a frontend using QML? This is the name of the language of the Qt Declarative module, that has just seen the light and will be merged into Qt for the 4.7 release.

Imagine this:

  • theme creators will have 100X or more expressive power: make snow! login via a tetris puzzle! bounce my webcam picture!
  • there will be animated themes (for login, user change, logout, etc..) or simple ones for more ‘classic’ kind of people
  • kdm only needs to add a couple of bindings to the qml runtime, like functions for logging in and shutting down / suspend the system
  • there is no need for compiled binaries, packages will be interpreted by the qml runtime – finally a painless get-hot-new-stuff (compared to plasma widgets, at least).


I’m not able to mock-up what comes to my mind, but just look at some qml videos on youtube to grab the concept.
What do you think about that? Could this be a low-effort high-inpact development for KDE 4?

Thanks to Davide Bettio who made me blog this.

I’m going Multi-Touch

This is one of the hottest topics of the moment: Multi-Touch (see the trends here). Every review of the just released Qt 4.6 mentions the Touch-and-Gestures framework and KDE is getting ready to use the technologystill it doesn’t work on X11 (yet).

MultiTouch can be Fun !

Wacom_Bamboo-Fun-smallI couldn’t resist, so for 99€ (120$) I bought a Bamboo Fun Pen & Touclh tablet. I find this really affordable, since you get: A. the precision of a graphics tablet (with 1024 pressure levels, back eraser, etc..) and B. a real 2-Pointers input device!

I tried the tablet on vista, with the latest drivers and the bundled applications bot I got disappointed because:
1. the scroll gesture is remapped to the mouse wheel.. so you lose all the ‘analog’ fun and it feels unconfortable.
2. the zoom gesture is remapped to CTRL+wheel, awkward fixed-steps again.
3. the rotate gesture is not supported by any app even the bundled ones i tried.

In the end I thought this was not “multi-touch”, but some silly gesture-detection broken hardware. I was wrong.

Linux to the rescue

Step 1. After loading the wacom.ko module (updated with this patch) the Linux kernel prints out stuff like this:

[default   ] data: 02 00  00 00 00 00 00  00 00 00 00  00 00 00 00 00  00 00 00 00
[finger 1  ] data: 02 00  7d 80 fe 00 8a  80 fc 00 87  00 00 00 00 00  81 11 00 00
[finger 1+2] data: 02 00  ae 80 b6 00 72  81 08 00 70  87 81 5b 00 72  81 21 00 00
[finger   2] data: 02 00  00 00 00 00 00  81 59 00 b4  6d 81 59 00 ba  80 11 00 00

Can you see it ? This is a 2-finger device! :-)

Step 2. The Kernel understands the data and splits it into 2 input devices that Udev maps to /dev/input/wacom and /dev/input/wacom-touch. From here you can read higher level information for each finger such as the decoded position, pressure, click type (tap, doubletab), and more.

I WANT QTouchEvents AND QGestures !!

I do too :D And I wanted to hack something about that. But I stopped here:


We get the input from evdev and the Application needs QTouchEvents and QGestures, so the easy way would be to hack up a touchpoint feeder to the Qt framework that directly reads from evdev (evdev -> qt). This would work fine for 1 application, but what about two? And what about moving the X cursor too? I think evdev->Xdriver->XInput2->qt is the solution, but we must be sure that no valuable information is lost in the chain, that the event filtering is done in the right place and obviously, that the X driver does a good job. Unfortunately xf86-input-wacom (X input driver for wacom’s kernel driver) doesn’t support my Bamboo Fun Touch & Pen yet and moreover I don’t see MPX support in the sources, so I’m wondering how far away is the Qt multi-touch backend from seeing the light.


I don’t know which way the multi-touch will happen on linux, but I know for sure that we want to play with gestures and we want it soon :D

For more information:

  • Peter Hutterer’s blog. Peter is the MPX (Multi Pointer X) author and plays a big role in the community.
  • X Input Extension 2.0 features.
  • The Linux Wacom project. A community-driven effort to develop kernel and X drivers.

AddiQted to 4.6

note for planetkde readers: check the original article to see the video!

I confess, I’m addiQted. You obviously think it’s normal (you’re not reading this blog by accident, aren’t you?) but it wasn’t always like this: I’ve liked some previous versions, but the upcoming Qt 4.6 really rocks!

The Fotowall case

As I shown previosly, Fotowall already uses some features of Qt 4.6. How much?
Qt 4.6 is referenced in 32 places, for example in snippets like this:

    // center the path
    QPointF pathCenter = path.boundingRect().center();
    #if QT_VERSION >= 0x040600
    #elif QT_VERSION >= 0x040500
        path = QTransform::fromTranslate(-pathCenter.x(), -pathCenter.y()).map(path);
        QTransform tx;
        tx.translate(-pathCenter.x(), -pathCenter.y());
        path =;

From simple path translations to more complex property manipulations, everything got better. See this code snipped about extending QGraphicsObject in 4.6 versus 4.5 and 4.4.

    #if QT_VERSION >= 0x040600
    class AbstractContent : public QGraphicsObject
    class AbstractContent : public QObject, public QGraphicsItem
    #if QT_VERSION < 0x040600
        Q_PROPERTY(QPointF pos READ pos WRITE setPos)
        Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
    #if QT_VERSION < 0x040600 && QT_VERSION >= 0x040500
        Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)

Do you feel the pain?

I Need it

I need a world with Qt 4.6 only, because:

  • It’s too much of a pain to support older versions in the same codebase
  • It’s not even fair, because non-4.6 users won’t enjoy the program as it’s meant to be
  • I can’t use A TON of new features because they’ll either simplify too much the code, or just because they don’t have a pre-4.6 equivalent
  • and because I’d like to finally use

More 4.6 TEASING

  1. As you seem to like videos, here is a preview of something we’re working on for Amarok ;-) Qt 4.6 only!!
    YouTube Preview Image
  2. Also, since I’m soooo much a giver, see the new Fotowall’s Word Cloud feature, coming in 0.9 ;-)

See you @ Munich

I’m packing for the DevDays 2009 Munich. See you there ;-)

Cuteness 4.6

Seven days after the release of the Tech Preview 1, we released the latest stable Windows build of Fotowall [1] that was based on Qt 4.6. Somebody could argue that this is a bit imprudent. We did that because the benefits of the 4.6 release are worth the risk of the move!

Indirect Benefits, or ‘what you get for free’

Direct Benefits

  • Animation Framework: this simply r0cks! I don’t know about the whole Kinetic stuff, I just mean the ability to create simple property animations.
    I don’t have a video to show you but just take a look at the Fotowall’s Top-Bar, the tabs appear and disappear with a nice and smooth grow-shrink animation, that make the program look soo 2009-ish! finally!
  • QNetworkReply::isFinished(): thanks to this method I could implement a smart time-saver: when the user starts to drag a flickr picture, Fotowall starts downloading it. It can happen that, upon drop, the content has already been completely downloaded (so it can be placed in the canvas) or partially downloaded (so the used only needs to wait for the missing percent)


  • There are some graphics glitches when animating the opacity property of a QGaphicsProxyWidget (in OpenGL)
  • Even by setting the QGraphicsItem::ItemSendsGeometryChanges flag, the previous behavior is not perfectly restored (we used itemChange, and the new behavior doesn’t allow Fotowall’s mirrors to sync properly to the objects)

Movie Time!

I’ve tried hard to record a screencast about the Cuteness & Performance of Qt 4.6, but in the end I had to use my camera.

YouTube Preview Image

Thanks Nokia for this great release! ;-)

[1] Fotowall is a creative program to mix local and online graphics content and build original work.

Fotowall 0.8

Fotowall 0.8.2 has just been released and we’re already getting some great feedback ;-)

New features in Fotowall 0.8

Cherry picked cherry features from the delicious 0.8 release:

  • Now you’ll be able to deform text changing the shape of its baseline visually (see the “Fotowall” string in the image above and its Bezier control points)
  • Pictures can be cropped to a certain area, for example to select a single person from a group. Also picture’s transparency can be adjusted, to create nice fading effects
  • A lot of work has been put into enabling OpenGL acceleration, really useful if your canvas has 100+ semi-transparent objects ;-)
  • You can now work with a transparent window (or blurred, on Vista)
  • The top-bar is now context-sensitive. We’ll move more and more content properties to that instead of the old content configuration window

Plus a lot of user suggestions and fixes have been implemented to make Fotowall always easier and intuitive to use. The 0.8 release now ships in 6 different languages: english, italian, french, german, brazilian, polish. You can even contribute your own translations.

But our favorite news is that Fotowall now has it’s official website ;-)

What about next: we’re working hard on the 0.9 release and we already have lots of new features! You’ll be surprised by what you’ll be able to achieve with the next version :D

A final special thank to Zack Rusin who created the Text on path example that was the basis of our shaped text.