228
* Creates an actor showing the current contents of the given WindowActor.
230
* @param actor The actor from which to create a shnapshot
231
* @param inner_rect The inner (actually visible) rectangle of the window
232
* @param outer_rect The outer (input region) rectangle of the window
234
* @return A copy of the actor at that time or %NULL
236
public static Clutter.Actor? get_window_actor_snapshot (Meta.WindowActor actor, Meta.Rectangle inner_rect, Meta.Rectangle outer_rect)
238
var texture = actor.get_texture () as Meta.ShapedTexture;
243
var surface = texture.get_image ({
244
inner_rect.x - outer_rect.x,
245
inner_rect.y - outer_rect.y,
253
var canvas = new Clutter.Canvas ();
254
var handler = canvas.draw.connect ((cr) => {
255
cr.set_source_surface (surface, 0, 0);
259
canvas.set_size (inner_rect.width, inner_rect.height);
260
SignalHandler.disconnect (canvas, handler);
262
var container = new Clutter.Actor ();
263
container.set_size (inner_rect.width, inner_rect.height);
264
container.content = canvas;
228
270
* Ring the system bell, will most likely emit a <beep> error sound or, if the
229
271
* audible bell is disabled, flash the screen