Exemplo n.º 1
0
 public WindowOpacityFader(Gtk.Window win, double target, double msec)
 {
     this.win      = win;
     win.Mapped   += HandleMapped;
     win.Unmapped += HandleUnmapped;
     fadin         = new DoubleAnimation(0.0, target, TimeSpan.FromMilliseconds(msec), opacity => {
         CompositeUtils.SetWinOpacity(win, opacity);
     });
 }
Exemplo n.º 2
0
        public void HandleMapped(object sender, EventArgs args)
        {
            bool composited = CompositeUtils.SupportsHint(win.Screen, "_NET_WM_WINDOW_OPACITY");

            if (!composited)
            {
                return;
            }

            CompositeUtils.SetWinOpacity(win, 0.0);
            fadin.Start();
        }