app: remove unsused surface ref in activate_surface()
[staging/windowmanager.git] / src / app.cpp
index a034fac..7c95151 100644 (file)
@@ -398,18 +398,6 @@ char const *App::activate_surface(char const *drawing_name) {
    // such a thing, we will just switch to this surface.
    // XXX: input focus missing!!1
 
-   // Make it visible, no (or little effect) if already visible
-   auto &s = this->controller->surfaces[*surface_id];
-
-   //// Set all others invisible
-   //for (auto &i : this->controller->surfaces) {
-   //   auto &si = this->controller->sprops[i.second->id];
-   //   if (si.id != s->id && si.visibility != 0 &&
-   //       int(si.id) != this->layers.main_surface) {
-   //      this->deactivate(si.id);
-   //   }
-   //}
-
    if (this->state.main == -1) {
       this->surface_set_layout_full(*surface_id);
       this->activate(*surface_id);
@@ -422,9 +410,9 @@ char const *App::activate_surface(char const *drawing_name) {
       if (this->state.sub == -1) {
          if (can_split) {
             if (this->state.main != *surface_id) {
-               this->surface_set_layout_split(this->state.main,
-                                              this->state.sub = *surface_id);
-               this->activate(this->state.sub);
+               this->surface_set_layout_split(this->state.main, *surface_id);
+               this->activate(*surface_id);
+               this->state.sub = *surface_id;
             }
          } else {
             this->surface_set_layout_full(*surface_id);