aboutsummaryrefslogtreecommitdiffstats
path: root/src/window_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window_manager.cpp')
-rw-r--r--src/window_manager.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index e9cc53a..28692ca 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -194,13 +194,19 @@ int WindowManager::init()
this->controller->chooks = &this->chooks;
// This protocol needs the output, so lets just add our mapping here...
- this->controller->add_proxy_to_id_mapping(
- this->outputs.front()->proxy.get(),
- wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
- this->outputs.front()->proxy.get())));
-
- // Create screen
- this->controller->create_screen(this->outputs.front()->proxy.get());
+ if(!this->outputs.empty()) {
+ // FIXME : Work around to avoid signal 11. Window Manager can't handle hotplug.
+ this->controller->add_proxy_to_id_mapping(
+ this->outputs.front()->proxy.get(),
+ wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
+ this->outputs.front()->proxy.get())));
+
+ // Create screen
+ this->controller->create_screen(this->outputs.front()->proxy.get());
+ }
+ else {
+ HMI_WARNING("wm", "No output object. Window Manager can't handle screen");
+ }
// Set display to controller
this->controller->display = this->display;