Looking at the "ADD Helper" plugin, it seems that it only obscures other windows, not the entire screen.
XScreenSaver darkens the entire screen before starting the screen saver. Why not look at its source to see how it is done? I think the Gnome shutdown dialog darkened the whole screen, but it doesn't seem like Ubuntu Intrepid.
It's a bit off the point, but why does the screen darken anyway? As a user, I would be very annoyed if your application darkened on my screen. I can follow other windows, and I would not be too happy if your application prevented this.
source share