I have kompmgr set up so that unfocused windows become transparent and I've noticed that when several windows ontop of each other are transparent it's a bit hard to see which ones are above or below the others. The windowfocus behaviour I would like is that if I click the titlebar of a window (that is below other transparent windows) that window will gain focus no matter what Z-index it's at. If an active window is transparent though, that window should not surrender it's focus if the titlebar of an underlaying window is clicked, the behaviour I'm talking about should only happen in the case of several transparent, unfocused windows. Or preferably, be configurable... If my description is a bit confusing, look at the screenshot and it should all be clear...
I've been browsing around KDE's source at http://lxr.kde.org/ for the better part of my day without getting much wiser as to where to start... Is this controlled via the xserver rather than through KDE?
Anybody with more knowledge in the area than me who's got any tips on where to get started or is interested in this functionality?
Are other people even interested in this functionality? Maybe someone has an argument why this is a lousy idea so that I can stop wasting my time learning how KDE works?

/AlienNation
Ratings & Comments
30 Comments
How will you deal two windows with the same size, if I want the front activate and click on it, the bachground window will get focus? Maybe its better to use the scrollwheel and scrolling through the windows.
Good Idea
Thanks! thomas12777 is working on implementing this and getting it included into kde svn. I haven't heard anything about the progress in a while though.
This would be an interesting idea for KDE 4. I think to make it clear what the window manager was going to do, when you mouseovered a window title bar in the background, it should become highlighted (or momentarily brought to the front) so that the behaviour isn't completely unexpected if you're not actually trying to do that. It would be very annoying to be clicking in a window to bring it to the front, not realising that behind where you clicked there was a titlebar to another window that you didn't care about, and having the other window appear instead.
Hehe, I just wrote almost the same sentence as you, regarding the confusion if mistakingly focusing the wrong window, when answering another comment before I saw yours :) Yeah highlighting on mouseover would be a good idea and the behaviour should not apply to active windows. Maybe even a Ctrl+Click or something like that would be good so that the user definately knows what he/she is doing.
For questions about developing the feature is the kwin@kde.org mailing list.
Thanks, I'll look through the list and then ask some questions there...
This link will help to improve the idea: http://liihs.irit.fr/dragice/foldndrop/
Wow, I looked at the video and that was really impressive. Think I'll leave that part to someone else though ;)
well, you could start looking at kdebase/kwin/kompmgr, but it's not really the most beautiful code and it's one bin plain C file. The thing you want to implement is interesting, however it may be a bit tricky. With kompmgr you can only control the displaying of windows on the screen. What you want is also to redirect X Events so that they are received by different windows than the "on top" window. I doubt that it van be done without extensive X knowledge, but somebody please correct me ;)
Yeah that's what I figure... Been looking in the kompmgr code but I don't think that has much to do with controlling the focusing of windows. Felt hard enough trying to figure out the KDE sources, really not looking forward to start digging in the xorg code... :)
it's not /that/ hard to implement 1st off: keep your fingers away from kompmgr.c - it's no way related 2. the right place is kwins evenmanager if (LMB) if (METABUTTON) if (opacity < 0xFFFFFF) for (all clients above in stack) if (windowTitle.contains(LMB.pos())) client.bring_up() else don't do anything() //don't dare to pass the meta'd LMB to the top window- could cause whatever as you can see you don't even have to operate on X event queue regards
AAHHHHHHHHHHHHHHHH!!!!
WHY DO I HAVE TO WRITE <br> everytime i want a LINEBREAK???
(much fun reading the above)
Hehe, no worries, it was quite clear anyway :) Hopefully I'll get some time to get the KDE SVN today and start poking around a little... Great comment, thanks!
be carefull, current svn trunk is allready kde4
as the 3.5 feature list is frozen in 3 days, i proposed those features on the kwin-devel list (hopefully not too late) and if lubos says "ok" i'll just code it in (aside some other stuff)
if you want to code it, please shortly contact me, so we won't do it both
I would be happy to have you code it. That would be great! It will probably actually work then... =)
I think it is a great idea! At first I dindn't really understand what you meant, but then I looked at the screenshot and it became all clear. It would be an improvement in usability and user-friendlyness. Also it would improve the speed of which you can chance from app to app. However I have no idea how this could be acheaved... So I can't help you with that. btw: composite isn't supported by the ati (closed source) drivers, and I have to use ATI at the moment. So I wont be able to test it anyway... I hope your idea will be realised some day. cheers tuxer
Aw crap, doesn't ATI support the xcomposite extension? I just bought a new computer with an ATI card (it was a good deal but I couldn't choose the graphics card...). Haven't installed linux on it yet and now I guess I'll be a bit disappointed... Hope they'll get around to improve the drivers a bit more, and soon! Thanks for the positive feedback though.
The "open-source" ati drivers do support composite. But not accelerated. So it will be quite slow to run it. NVIDIA does support hardware accelerated composite ATI closed source driver: you can't even run composite..... I also hope they will fix it soon
Yeah, been using Nvidia for a few years in Linux and they've always been good to me =) Hope ATI will make an effort to catch up. From what I've read on the net the latest drivers are descent but much is left to be done.
I looked around a little, and though I couldn't find any good information on ATi's website I found this on the gentoo wiki: http://gentoo-wiki.com/TIP_Xorg_X11_and_Transparency It seems that composite does work with the proprietary ATi drivers but enabling it disables direct rendering.
thanks! I will take a look at it .... After doing a quick read: They say that ati drivers work with composite, but then you lose hardware OpenGL support. This probably means composite isn't hardware accelerated too. (Correct me if I am wrong)
Yeah that's probably true, I'm not sure either though. I'm gonna have to try and see as soon as I get around to installing Gentoo on my new machine.
I also think it's a great idea! When I can focus all windows on the screen, even if they are behind other windows, there is no need for a Microsoft-Windows-Style taskbar. That would be great. I never liked the taskbar but it was the fastest way to access all windows on the screen.
Yeah that's what I think as well. And now when I have transparent windows i find myself focusing the "wrong" window at times since the window that gets the focus was above the window that I actually wanted to focus.