diff options
author | Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> | 2016-12-13 14:35:25 +0900 |
---|---|---|
committer | Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> | 2016-12-14 14:41:46 +0900 |
commit | 57e18aeaf2a9ae292af7559580f8154527fc04f5 (patch) | |
tree | c1071a6288a30d3743bcbfbdc6d96cc96e1a4abc /WindowManager/src/windowmanager.hpp | |
parent | b9f0e1049e70e9553a752d13de5d4023e85cc662 (diff) |
Fix and improve switching applications
v2: (Tadao Tanikawa)
Minor fixed pointed by reveiw and organize debug message
v1: (Tadao Tanikawa)
Quick hack to fix and improve switching applications.
Changes:
* Improve management of layers and surfaces
Previously single layer was shared among all applications,
now each application has its own layer.
* Improve showing / hiding applications
Previously to show/hide application, surfaces are added
or removed everytime, but it's slow.
Now reordering layers controls showing/hiding applications,
it much faster.
* Shortcut icons whose application is not installed no
longer cause issue to switch apps.
Caution:
This patch is very quick hack, and many old codes which
regarding to management surfaces are disabled, so there
may be unnoticed degraded.
Change-Id: I69494213b0d1b169558f3d792ebecf414caccacc
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'WindowManager/src/windowmanager.hpp')
-rw-r--r-- | WindowManager/src/windowmanager.hpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/WindowManager/src/windowmanager.hpp b/WindowManager/src/windowmanager.hpp index 8c8f63c..5cc536b 100644 --- a/WindowManager/src/windowmanager.hpp +++ b/WindowManager/src/windowmanager.hpp @@ -27,7 +27,6 @@ #ifdef HAVE_IVI_LAYERMANAGEMENT_API #include <ilm/ilm_control.h> #endif - class WindowManager : public QObject { Q_OBJECT @@ -40,7 +39,6 @@ public: private: WindowmanagerAdaptor *mp_windowManagerAdaptor; QList<Layout> m_layouts; - QList<int> m_appSurfaces; QMap<int, unsigned int> *mp_layoutAreaToSurfaceIdAssignment; int m_currentLayout; @@ -49,14 +47,21 @@ private: unsigned int m_screenWidth; unsigned int m_screenHeight; - int* m_showLayers; - int getLayerRenderOrder(t_ilm_layer id_array[]); - void dumpScene(); #ifdef HAVE_IVI_LAYERMANAGEMENT_API - void createNewLayer(int layerId); - void addSurfaceToLayer(int surfaceId, int layerId); + t_ilm_layer* m_showLayers; + QMap<pid_t, t_ilm_layer> m_appLayers; + int getLayerRenderOrder(t_ilm_layer* id_array); + + void createNewLayer(const int layerId); + + t_ilm_layer getAppLayerID(const pid_t pid); + + pid_t m_pending_to_show; + + void addSurfaceToAppLayer(const int surfaceID); + void addSurfaceToLayer(const int surfaceId, const int layerId); #endif void updateScreen(); @@ -99,15 +104,16 @@ public Q_SLOTS: // METHODS int addLayout(int layoutId, const QString &layoutName, const QList<LayoutArea> &surfaceAreas); int deleteLayoutById(int layoutId); QList<Layout> getAllLayouts(); - QList<int> getAllSurfacesOfProcess(int pid); + // QList<int> getAllSurfacesOfProcess(int pid); QList<int> getAvailableLayouts(int numberOfAppSurfaces); - QList<int> getAvailableSurfaces(); + // QList<int> getAvailableSurfaces(); QString getLayoutName(int layoutId); void hideLayer(int layer); int setLayoutById(int layoutId); int setLayoutByName(const QString &layoutName); int setSurfaceToLayoutArea(int surfaceId, int layoutAreaId); void showLayer(int layer); + void showAppLayer(int pid); Q_SIGNALS: // SIGNALS void surfaceVisibilityChanged(int surfaceId, bool visible); |