{June 12, 2008}   shiny!

whee! only thusday and already I have my goal for the week done. I have plasma-overlay displaying properly over the screensaver. on my laptop, where composite is on, I can see them both together. on my desktop, where composite is off, I only see plasma (and the screensaver process should be nicely suspended). I have a screenshot of the composited one, and as usual the code is up on gitorious. :)

I had to set up a dbus interface before this would work – need to pass the winid n’stuff. There are some nice techbase tutorials, but I still ended up banging my head against the wall a few times :P I’ve never worked with dbus before. still, in the end I managed to do everything in a way that feels nice. :) I’m quite happy that I managed to get cmake generating both the xml and the adaptor-class for me. :)

once dbus was working, then I had to get the window stacking order right, so that plasma-overlay was above the saver and under the lock dialog. ohhh, the headaches that caused. as I was on my way to a party last night I realised that half my problem was that I was using the wrong winId. :) so when I got home of course I had to go bacck on the computer and test this, and bam! plasma-overlay shows up. :D
…and then I discover that I can’t get rid of it. the screensaver won’t respond. killing krunner_lock crashed X. doh. turns out I had an infinite loop in the stacking code because I ignored a comment about infinite loops… :) once I had that fixed, I polished off a few things, and… well, it works now.

of course, when I say “works”, I mean it displays the way I want it to. I still have the problem that the unlock dialog steals all input, so I can’t actually *interact* with plasma from the screensaver. but that’s next week’s goal. :)

I guess now I can spend the rest of the week seeing if non-compositing ways of trying to draw the screensaver are really as bad as I think they are. or fixing plasma bugs. or just enjoying the sunshine. :)

Lure says:

This is very cool and I am really glad for the progress that you made.

pns says:

How about having the lock dialogue as a plasmoid so that dialogue itself looks nice and blends with plasma…

Kitsune says:

I’m guessing that the plasma_overlay is running as a separate process from the screensaver itself? If so, for non-composite systems you could always use the hack that Konqueror use(d) for nsplugins support in the KDE3 series (I’m not sure if it does the same thing for 4). From what I’ve read, it’d basically send what the plugin wanted to render over to Konqueror via dcop, and Konqueror would send the input back to the plugin process via dcop (theres probably more to it than that :P). Although I think this would fall way into the category of ‘bad’ that you mentioned ;)

Using composite would probably be a good approach that web browsers should switch over to using (instead of embedding it into the same process and crashing everything that all but Konqueror seem to use)…

Chani says:

pns: originally I wanted that, but if plasma crashes you don’t want to be stuck without an unlock dialog, so… it’ll take some more thought. I do still hope it could be done eventually.

kitsune: yes it’s a different process – but part of the problem is that screensaver processes expect to be handed an X11 winId they can draw into (and many then draw *constantly*). changing that would mean changing the spec, and I’m not sure I have the time or energy for that. I don’t want kde to suddenly be incompatible with all the ancient screensavers that might be out there.

yman says:

About the UI:
How about if it shows the screensaver, then when there’s input it shows a Plasma containment similar to the desktop containment, but with the following differences:
It’s completely locked down. You can’t add or modify widgets in any way, only use them.
The widgets run with guest privileges, if practical for the purposes of this project.
The bottom panel displays the following 4 buttons: Leave Message, Switch User, Unlock.
When idle for a given amount of time, it returns to the screensaver.

Kitsune says:

In the future I should probably read first ;) After reading your previous posts about this I now get that you’re trying to solve a different problems than I yammering on about :P

The only easy solution I can think of at first actually sounded really brilliant (thats the point I should have realized something was afoul ;), but then I suddenly realized I was thinking of how Composite itself works.. have the screensaver draw to an off-screen pixmap, then have Plasma use that as its background… now that pesky green color is your screensaver! The alternative would be to decree that all screensavers must be a single solid color, which can be any color they so desire (as long as it’s ‘pesky green’ ;)

[…]   soc week 3 these weekly reports are going to be pretty boring if I keep blogging about what I’ve done halfway through the week. :) I haven’t written any code since then; I spent my time dealing […]

Comments are closed.

et cetera
%d bloggers like this: