Apply blur effect for every tooltip window (experimental)

This commit is contained in:
Adam Bieńkowski 2018-07-08 22:07:07 +02:00
parent c2ab2380ea
commit 0237175eb9
2 changed files with 16 additions and 0 deletions

View File

@ -58,6 +58,10 @@ namespace Gala
() => critical ("Could not acquire name") );
}
public static unowned DBus get_instance () {
return instance;
}
private DBus ()
{
blur_actors = new Gee.HashMap<uint32, BlurActor> ();

View File

@ -1249,6 +1249,18 @@ namespace Gala
default:
map_completed (actor);
break;
case WindowType.TOOLTIP:
bool hardcode_clip = false;
if (hardcode_clip) {
var rect = window.get_frame_rect ();
DBus.get_instance ().enable_blur_behind ((uint32)window.get_xwindow (), 8, 8, rect.width - 9, rect.height - 9, 255);
} else {
DBus.get_instance ().enable_blur_behind ((uint32)window.get_xwindow (), 0, 0, 0, 0, 255);
}
map_completed (actor);
break;
}
}