aboutsummaryrefslogtreecommitdiffstats
path: root/src/window_manager.hpp
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-06-29 19:46:55 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-07-09 10:04:38 +0900
commitcf05c2b5c92b9a79635aa2277a9d55449e14fab6 (patch)
tree6887035dc77dfe14362914f6bd116601006c39cd /src/window_manager.hpp
parent6373ce04e2d6c6ae77246bcf7560447b3daaed3d (diff)
Convert the roles from old one to new
Update the role name (drawing_name) and WindowManager converts the role from old one to new. We plan to delete the old roles by GG. Therefore the applications can use old olds until GG, After GG, old roles can not be used. If the applications use it, WindowManager regards the applications as the role "fallback". Therefore the applications may not be displayed in the intended layout. For the role "fallback", please refer to JIRA SPEC-1331. Bug-AGL: SPEC-1566 Change-Id: I6ca703183e3cab72ac460094ef14dc3675a98cb6 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/window_manager.hpp')
-rw-r--r--src/window_manager.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/window_manager.hpp b/src/window_manager.hpp
index b5b1c4d..4c67a22 100644
--- a/src/window_manager.hpp
+++ b/src/window_manager.hpp
@@ -17,7 +17,6 @@
#ifndef TMCAGLWM_APP_HPP
#define TMCAGLWM_APP_HPP
-#include <json-c/json.h>
#include <atomic>
#include <memory>
#include <unordered_map>
@@ -30,6 +29,8 @@
#include "request.hpp"
#include "wm_error.hpp"
+struct json_object;
+
namespace wl
{
struct display;
@@ -265,12 +266,19 @@ class WindowManager
void stopTimer();
void processNextRequest();
+ int loadOldRoleDb();
+ const char* convertRoleOldToNew(char const *drawing_name);
+
const char *check_surface_exist(const char *drawing_name);
bool can_split(struct LayoutState const &state, int new_id);
private:
std::unordered_map<std::string, struct compositor::rect> area2size;
+ std::unordered_map<std::string, std::string> roleold2new;
+ std::unordered_map<std::string, std::string> rolenew2old;
+
+ static const char* kDefaultOldRoleDb;
};
} // namespace wm