homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmainwindow.cpp
changeset 96 458d8c8d9580
parent 92 6727c5d0afc7
equal deleted inserted replaced
92:6727c5d0afc7 96:458d8c8d9580
    19 #include <HbView>
    19 #include <HbView>
    20 #include <HbInstance>
    20 #include <HbInstance>
    21 #include "hsmainwindow.h"
    21 #include "hsmainwindow.h"
    22 #include "hsmenuview.h"
    22 #include "hsmenuview.h"
    23 #include "hsmenumodewrapper.h"
    23 #include "hsmenumodewrapper.h"
    24 
    24 #include "hsscene.h"
       
    25 #include "hspage.h"
       
    26 #include "hspagevisual.h"
       
    27 #include "hswallpaper.h"
    25 /*!
    28 /*!
    26  Constructor
    29  Constructor
    27  */
    30  */
    28 
    31 
    29 
    32 
    64         
    67         
    65     if (!hbW->views().contains(view)) {
    68     if (!hbW->views().contains(view)) {
    66         hbW->addView(view);
    69         hbW->addView(view);
    67     }
    70     }
    68     
    71     
       
    72     // For some reason all visible items will pe rendered even they are outside of the viewport
       
    73     // Hide inactive pages and wallpapers to make screen shot faster
       
    74     HsScene *scene(HsScene::instance()); 	
       
    75     QList<HsPage *> pages(scene->pages());
       
    76     foreach (HsPage *p, pages) {
       
    77         if (p != scene->activePage()) {
       
    78         		p->wallpaper()->hide();
       
    79             p->visual()->hide();
       
    80         } 
       
    81     }
    69     bool animate  = !hbW->isObscured();       
    82     bool animate  = !hbW->isObscured();       
       
    83     // source view will be rendered to cache
    70     hbW->setCurrentView(view, animate, Hb::ViewSwitchCachedFullScreen);
    84     hbW->setCurrentView(view, animate, Hb::ViewSwitchCachedFullScreen);
       
    85    	// restore previous
       
    86    	foreach (HsPage *p, pages) {
       
    87         if (p != scene->activePage()) {
       
    88         		p->wallpaper()->show();
       
    89             p->visual()->show();
       
    90         } 
       
    91     } 	
    71 }
    92 }