[gnome-continuous/wip/apptest: 3/5] startstopapps: Immediately hide windows when we're done with them



commit e0699cc4fe5c98cbf3753ae2ef2300698f75bf46
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Nov 13 13:24:54 2013 -0500

    startstopapps: Immediately hide windows when we're done with them
    
    So that they don't show up in future screenshots if the app is taking
    a while to shut down.

 src/tests/gnome-continuous-startstopapps |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/tests/gnome-continuous-startstopapps b/src/tests/gnome-continuous-startstopapps
index d08254c..3ee6c1b 100644
--- a/src/tests/gnome-continuous-startstopapps
+++ b/src/tests/gnome-continuous-startstopapps
@@ -25,7 +25,12 @@ const Format = imports.format;
 
 const sessionBus = Gio.bus_get_sync(Gio.BusType.SESSION, null);
 
-const CLOSE_APP = 'Shell.AppSystem.get_default().lookup_app("%s").request_quit();';
+const CLOSE_APP = 'Shell.AppSystem.get_default().lookup_app("%s").get_windows().slice().forEach(function(w) 
{ \
+   w.get_compositor_private().hide(); \
+   w.minimize(); \
+   w.delete(global.get_current_time()); \
+});';
+
 const GET_APP_IDS = 'Shell.AppSystem.get_default().get_running().map(function (a) { return a.get_id(); });';
 
 const StartStopApps = new GObject.Class({


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]