Remove floating surfaces when activate surface
[apps/agl-service-windowmanager.git] / src / app.cpp
index 7dbf397..64a1835 100644 (file)
@@ -872,6 +872,11 @@ void App::api_activate_surface(char const *appid, char const *drawing_name, char
 
     auto client = app_list->lookUpClient(id);
 
+    unsigned srfc = client->surfaceID(role);
+    if(srfc != INVALID_SURFACE_ID){
+        // remove floating surface
+        app_list->removeFloatingSurface(client->surfaceID(role));
+    }
     /*
    * Queueing Phase
    */