app/binding: implement crude syndraw/enddraw/flushdraw sequence
[staging/windowmanager.git] / src / app.hpp
index 297b6af..e661794 100644 (file)
@@ -127,8 +127,6 @@ struct App {
       return this->id_alloc.lookup(id);
    }
 
-   struct LayoutState state;
-
    // Set by AFB API when wayland events need to be dispatched
    std::atomic<bool> pending_events;
    void set_pending_events() {
@@ -140,6 +138,8 @@ struct App {
          x, false, std::memory_order_consume);
    }
 
+   std::vector<int> pending_end_draw;
+
    explicit App(wl::display *d);
    ~App();
 
@@ -164,6 +164,8 @@ struct App {
    char const *activate_surface(char const *drawing_name);
    char const *deactivate_surface(char const *drawing_name);
 
+   char const *enddraw(char const *drawing_name);
+
    // Events from the compositor we are interested in
    void surface_created(uint32_t surface_id);
    void surface_removed(uint32_t surface_id);
@@ -180,7 +182,7 @@ struct App {
    void activate(int id);
    void deactivate(int id);
 
-   bool can_split(int new_id);
+   bool can_split(struct LayoutState const &state, int new_id);
 };
 
 }  // namespace wm