There has been a Feature Request to port KWin to the Microsoft Windows platform (see Bug 182700) and we have started secretly to port KWin to Microsoft Windows Vista. And today we are proud to announce that there will be a first release for the Microsoft Windows platform with KDE 4.3.
Of course porting an application that is tied so much to the X11 platform is not a simple task. That’s why we won’t provide the window manager functionalities in the first version. There will only be the compositing effects. Microsoft allows to access Vista’s Aero features so we just had to implement a new Direct3D backend. KWin’s compositing support is very modular and there are already two backends OpenGL and XRender, so adding support for Direct3D is not that difficult. So we added a new scene_direct3d.cpp file which handles the compositing the same way as the existing scene_opengl.cpp.
A more complicated task were the EffectWindows which represent a window in the effect. In the current implementation it is tied to X Clients: managed, unmanaged and deleted clients. These types have the parent class TopLevel. So what we needed was a new Client implementation called WindowsWindow. We are not able to manage those windows as porting the window management functions is – as said – too difficult. So for the effects everything is transparent, nothing changed. When accessing an EffectWindow in X11 it will be a managed or unmanaged client, in Microsoft Windows it’s an WindowsWindow.
Of course our Effect API allows to access all the window management functionalities. It would be kind of a joke if you have the cube but cannot change the desktop. As the Microsoft Windows plattform does not know the concept of virtual desktops we can of course not provide these API calls. So we had to implement a WindowsEffectsHandler Implementation which provides access to all the functions for API compatability and just returning dummy values. effects->numberOfDesktops() will always return 1. That is effects relying on effects->numberOfDesktops() > 1 will not work. So no cube effect 🙁
We have now reached a point in the porting effort that we are confident to have all the important effects ported till hard freeze. CoverSwitch and FlipSwitch are already working, also small effects like MagicLamp and MinimizeAnimation are nearly done (we still have some problems with retrieving the icon position).
I think you want to see a screenshot of current state. As FlipSwitch was the first effect to use 3D in KWin I finished this port first and here it is:
Unfortunately nobody from KWin team registered for a Windows 7 beta licence. So we are currently unable to test with the upcomming release. We hope that Microsoft will see the chances a good and working Compositing implementation will provide for their platform and that they will provide us all needed help including licences for the new version.