well, what did I do this week? it’s been such a long week.
on monday I fixed some little bugs, and made configuration only possible while widgets are unlocked. tuesday and wednesday I was out camping… or rather, cycling 80km to the campground, sleeping, then cycling to the nearest bus. ;)
after I recovered from that, I spent a few days fighting with git. git-svn is a fragile little baby and I did something it didn’t like, so everything got all confused. :( but eventually I managed to create a new master-branch without any weird double commits, and get things working again.
yesterday, I made transparency options for plasma-overlay. you can set the opacity both for when plasma is active (meaning you moved the mouse or typed recently, and the screen’s locked) and for when it’s idle. however, the performance isn’t great, so if your system isn’t very powerful you might want to stick to 0 or 100% opacity.

I also realised something… developing in a public git repo isn’t all that helpful if nobody’s actually looking at it. I’ve had hardly any code review :/ that’s not a good thing. hopefully now that it’s in svn people will start pointing out the weird bits in the code; I’ve also hacked post-review-plasma so that I can put my code on reviewboard again. :)
I’m posting a bit early this week, because I’m feeling impatient. :)
I don’t actually have that security stuff implemented - planned out, but not implemented. but I have an excuse, I’m waiting for aaron ;) so in the meantime I… well, I procrastinated a lot, relaxed a little, and then eventually skipped ahead to next week’s goal - adding an option in the screensaver config to turn this thing on and off.
now that it’s actually possible to disable it (and it’s off by default), I figure it’s okay to let people try it out. trunk conveniently unfroze, so I cleaned up a couple of bugs and committed everything to svn (mmm, git flood). have fun! :)
however, I warn you: soc is still not over. there are still some gaping holes in my project. don’t expect it to actually make sense or anything until after akademy. it will eat your babies ;)
well, I spent yesterday lazing around on the beach reading about design patterns, so I guess I have to get work done today.
I need to audit a bunch of widgets for security, or at least group them vaguely based on how I expect the audit to turn out (some aren’t even worth doing, either because they’re trivial or they have no business being on a locked screen at all). we have a *lot* of plasmoids now :P and I’m only looking at the ones I know of. this isn’t the most exciting thing in the world, so I’m looking for any excuse to procrastinate ;)
someone on irc was bugging me about the lack of screenshots in my blog. :) so I thought, why not show another screenshot of my screensaver?

huzzah! I managed to get caught up this past week, despite RL being busy. password checking is there… the config button is still there when locked, but I decided it made more sense to fix that *after* general security stuff is in place, so instead I made the dialogs hide when plasma is locked, and made it lock whenever plasma’s hidden or the timeout is reached. that way a locked screen becomes a fully-locked screen again if you’re called away :)
now that plasma essentially works, I need to focus on security. oh joy. widgets need to *not* let the user do whatever they please when they’re on the screensaver. so, I have to design some system for letting the widgets know they should be locked down (hopefully something a little better than just-lock-everything so that it can be useful outside of my project) and then get some widgets to follow it.
oh, and
ok, so week 5 ended a day or two ago. I normally blog monday nights, but I was coding right up to bedtime.
anyways… I was not lucky. the input issues turned out to be a royal pain in the ass. however, with help from some other devs (especially fredrikh) and a favourable alignment of the stars (seriously, I have no idea what fixed the qaction issue) - I’ve almost got it licked. :) I’m just playing with getting the keyboard input to go to the config dialogs now. [iiinteresting. the basic config is fine, but the font selector breaks the second time it's shown. hmmmm.]
once those last little issues are worked out (assuming they don’t turn into big monsters), I can get this code merged in, then start on security stuff. if I can get password checking working quickly and make those config dialogs hide themselves when plasma’s locked/hidden, maybe I can kill a bug or two as well before the week ends. :)
I took a bit of an unscheduled break this week. didn’t write any code until sunday (although I did read and think about and talk about code). :) it was nice to just relax for a while.
unfortunately I haven’t *quite* got my goal for the week finished. input is somewhat partially working; I can click on things, and keypresses are going through, so the basic stuff is there. contextmenus and plasma-dialogs work, although they’re drawn below the semitransparent containment background (it’ll be fully transparent later, but this is useful for debugging). the add-widgets dialog and config dialogs aren’t showing up, but I’m sure they’re out there somewhere. ;) what bugs me right now is that qactions’ keyboard shortcuts aren’t working at all, and I’m not sure how to solve that one.
the code for this stuff is currently in the ‘input’ branch on gitorious.
if I’m lucky I’ll get those bugs ironed out tonight or tomorrow and be back on track for this week’s goal - requiring a password to unlock plasma. and if I’m not lucky… well, that’s why week 6 was left blank. :)
oh, and my email got pretty backed up while I was relaxing. I’d only been keeping up with things addressed directly to me and a few important parts of lists, and ended up with around 2500 unread messages! :/ it turns out that a little over two thousand of them were plasma bugreports; I hadn’t touched that folder in about two weeks, and before that I hadn’t quite been keeping up with it (it was hovering around 500 for a while).
so, I gave up and marked the folder as read. it’s starting to fill up again already. :/ ick. there are way too many bugreports there. being busy with soc, reading them isn’t really a useful way to spend my time anyways, I guess.
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 with some Real Life stuff I’d been neglecting, then getting outside and enjoying the sushine. :) I need to remember to spend more time outside the house and not get lost in my computer.
I did do some planning for this upcoming week, though. hopefully getting input working properly won’t be too much of a headache… we’ll see. I don’t think I’ll have time to actually write the code for that for another day or two.
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. :)
well, I pretty much covered it in my last post: I haz code now. yays.
since then I’ve cleaned up some little things and created my own containment without all the useless desktoppy stuff, so I’m back on schedule. :) I poked at the appearing-below-screensaver issue, and fredrikh gave me some pointers, but… I’d actually totally forgotten about that until a minute ago. luckily I still have the window open, so perhaps I’ll work on it tonight. looks like I also have to make a dbus interface for the lock process and the plasma one to talk to each other.
once I’ve got that dbus stuff running, I guess I’ll have to figure out once and for all whether there’s any feasible alternative to using composite.
actually, I just had an interesting thought, right this second.
see, for desktop containments, in 4.2 we’re planning to have background-drawing plugins, so that you can do things like using a folderview as a containment and having wallpaper in it too. I wonder… if a way to draw screensavers in the plasma process were to come along later, could it be done as one of those plugins? if it could, then it could be done later, if someone figures out a way after soc is over.
just a thought. might not necessarily be doable - drawing on the canvas would be sucky. but to get behind widgets you basically have to be drawing on the canvas, or drawing in the view’s background-painting function (and it’s not like that gets called at 20fps or anything), so there aren’t that many non-composite options for screensaver stuff in the first place.
I just pushed the first bits of my soc code to my public git repo. :) the code is awful and hackish and probably has lots of problems besides those noted in the merge commit-message, but it runs and you can add widgets. :)
right now there are two main problems with it. first, the only way to stop it is with `kquitapp plasma-overlay`. it’s easy to hide it, but impossible to re-show it. second, when it’s started via the screensaver, it shows up *under* the screensaver. fun, huh? oh, and if you want to compile it, see README.git first. and be aware that it’s based on a copy of workspace/ that may not be entirely up-to-date (aren’t bic changes fun?). doing a git svn rebase seems to spew commit messages all over gitorious; I wish there was a way around that.
I’m hoping that ossi can help me get it running over the screensaver nicely, because that code isn’t always easy to understand. aseigo, ossi, sebas: if any of you have time, please review the code for me :) I’ve never really written an app from scratch, there’s lots of copy&paste from plasma/plasma, and I’m sure there are tons of things I’ve done wrong. (should my app even be a KUniqueApp in the first place? should it fork? etc, etc…)
oh, and I suppose I should add my own name to some of the copyright somewhere. I’m terrible at attribution - there must be a ton of files in plasma that should have my name in them and don’t :P
now, since I don’t see aaron or ossi online, I guess I’ll work on making my own containment so I can stop using the desktop one. :)