diff options
-rw-r--r-- | src/window_manager.cpp | 3 | ||||
-rw-r--r-- | src/wm_client.cpp | 5 | ||||
-rw-r--r-- | src/wm_client.hpp | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp index cd7d2e5..5dc22be 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -187,6 +187,9 @@ result<int> WindowManager::api_request_surface(char const *appid, char const *dr auto id = int(this->id_alloc.generate_id(role)); this->tmp_surface2app[id] = {str_id, lid}; + auto client = g_app_list.lookUpClient(str_id); + client->registerSurface(id); + return Ok<int>(id); } diff --git a/src/wm_client.cpp b/src/wm_client.cpp index e7cb552..040c52b 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -111,6 +111,11 @@ unsigned WMClient::surfaceID() const return this->surface; } +void WMClient::registerSurface(unsigned surface) +{ + this->surface = surface; +} + /** * Add surface to the client * diff --git a/src/wm_client.hpp b/src/wm_client.hpp index 623d34f..9568324 100644 --- a/src/wm_client.hpp +++ b/src/wm_client.hpp @@ -51,6 +51,7 @@ class WMClient std::string role() const; unsigned layerID() const; unsigned surfaceID() const; + void registerSurface(unsigned surface); WMError addSurface(unsigned surface); bool removeSurfaceIfExist(unsigned surface); |