diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2019-01-29 13:18:17 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2019-02-04 19:54:01 +0900 |
commit | a0fa6394c0d8b7997343d6f2a44d9c2868f4be5f (patch) | |
tree | 33dee52eb43bfbf77fafbcecbe5e96a062179853 /src/util.hpp | |
parent | b72e372690e677c38fa9b5ae90fb7fbe5a575c76 (diff) |
Fix top surface becomes invisible when background surface is crashed.
Fix top surface becomes invisible when surface on same layer,
such like application layer, is crashed.
To fix this issue, I refactored attaching app to layer.
Originally, window manager attached app to surface.
This patch is the backport of master branch.
Bug-AGL : SPEC-1635
Change-Id: Ie6713e669a25662e8547aa7782551ddae60c7e01
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/util.hpp')
-rw-r--r-- | src/util.hpp | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/src/util.hpp b/src/util.hpp index d3cab08..bf2e517 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -37,7 +37,7 @@ #define HMI_SEQ_INFO(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__) #define HMI_SEQ_DEBUG(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__) -#define DUMP(args, ...) _DUMP(LOG_LEVEL_DEBUG, args, ##__VA_ARGS__) +#define DUMP(args, ...) _DUMP(LOG_LEVEL_INFO, args, ##__VA_ARGS__) enum LOG_LEVEL{ LOG_LEVEL_NONE = 0, @@ -53,24 +53,15 @@ void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const in void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...); void _DUMP(enum LOG_LEVEL level, const char *log, ...); -/** - * @struct unique_fd - */ -struct unique_fd +struct rect { - int fd{-1}; - unique_fd() = default; - explicit unique_fd(int f) : fd{f} {} - operator int() const { return fd; } - ~unique_fd(); - unique_fd(unique_fd const &) = delete; - unique_fd &operator=(unique_fd const &) = delete; - unique_fd(unique_fd &&o) : fd(o.fd) { o.fd = -1; } - unique_fd &operator=(unique_fd &&o) - { - std::swap(this->fd, o.fd); - return *this; - } + int32_t w, h; + int32_t x, y; +}; + +struct size +{ + uint32_t w, h; }; class rectangle @@ -130,4 +121,4 @@ class rectangle // Configuration file path helper std::string get_file_path(const char *file_name, const char *log_category = "wm"); -#endif // !WM_UTIL_HPP +#endif // WM_UTIL_HPP |