policy: add a simple policy stub, broke some layouting tho
[staging/windowmanager.git] / src / app.hpp
index 71bc2c2..ed27cf2 100644 (file)
@@ -30,6 +30,7 @@
 #include "controller_hooks.hpp"
 #include "layers.hpp"
 #include "layout.hpp"
+#include "policy.hpp"
 #include "result.hpp"
 #include "wayland.hpp"
 
@@ -126,6 +127,8 @@ struct App {
 
    std::vector<int> pending_end_draw;
 
+   Policy policy;
+
    explicit App(wl::display *d);
    ~App();
 
@@ -179,6 +182,9 @@ private:
    void deactivate_main_surface();
 
    bool can_split(struct LayoutState const &state, int new_id);
+   void try_layout(struct LayoutState &state,
+                   struct LayoutState const &new_layout,
+                   std::function<void(LayoutState const &nl)> apply);
 };
 
 }  // namespace wm