transparency doesn't work

Bug #1159855 reported by Adam Spiers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Screenkey
Fix Committed
Medium
Unassigned

Bug Description

Screenkey is awesome, but has one serious deficiency: the popup window is not transparent, despite the code including a "set_opacity(0.7)". Maybe this works for some desktop environments, but not for mine (XFCE4 + Openbox + xcompmgr), and anyway it looks like a standard method for implementing transparency in PyGTK should require much more than a single line of extra code, e.g.

http://stackoverflow.com/questions/10782527/pygtk-transparent-window

Related branches

Revision history for this message
Adam Spiers (adam.spiers) wrote :
Revision history for this message
Mike Kazantsev (mk-fraggod) wrote :

Hey Adam,

Can you try if fix from the linked branch above (lp:~mk-fraggod/screenkey/screenkey) works for you?

As you have compositing wm, it should work, but there's also an option for non-compositing wm's, which would require a bit more work (drawing text shapes on cairo surface and then using it as shape mask with "w.shape_combine_mask()"), but since X works fairly well with compositing these days, not sure if it's worth the trouble.

Revision history for this message
Adam Spiers (adam.spiers) wrote :

Works great, many thanks! I hope it can be merged into the trunk. Would be nice if the opacity level was configurable in the settings rather than hardcoded to 0.7, I'm guessing that's pretty easy to do too?

Pablo SEMINARIO (pabluk)
Changed in screenkey:
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Mike Kazantsev (mk-fraggod) wrote :

Yes, should be fairly trivial indeed, though not sure if it's worth creating whole config file just for that one parameter - maybe commandline option (e.g. "screenkey --opacity=0.5") would be a better match?

Another way would be to just make more stuff - like colors - configurable, but it shouldn't be necessary, given that these can be setup through gtkrc.

Revision history for this message
Mike Kazantsev (mk-fraggod) wrote :

Ah, right, managed to miss the systray and preferences dialog that's already there - will add the setting to it.

Revision history for this message
Mike Kazantsev (mk-fraggod) wrote :

Just pushed r54 to lp:~mk-fraggod/screenkey/screenkey with "Opacity" box in preferences.
Should be pickled between runs, same as with other options as well.

Revision history for this message
Adam Spiers (adam.spiers) wrote :

Awesome work, thanks a lot guys!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.