Code review comment for lp:~fferrai/elementaryos/fix-locking

Revision history for this message
Cameron Norman (cameronnemo) wrote :

This seems unnecessarily roundabout. Why not just run the light-locker-command from where the gnome-screensaver lock command is issued? That would work on light-locker and gnome-screensaver systems alike. The C code would look like so:

if (system("light-locker-command -l")) {
    /* On a light-locker system, and we just locked it */
} else {
    /* On a gnome-screensaver system */
    /* do gnome-screensaver stuff that was done previously */
}

I could put together something tomorrow if you guys think it is a better/simpler idea. Maybe if I actually called the dbus interface directly instead of went through light-locker-command, I could get something suitable for upstream inclusion, but I do not really like GObject C (which I would need to use for gdbus), so I can not say that I will be able to do it soon (however the logic and architecture would be the same).

« Back to merge proposal