summaryrefslogtreecommitdiff
path: root/src/protocols/TearingControl.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-04-20 13:25:29 +0100
committerGitHub <noreply@github.com>2024-04-20 13:25:29 +0100
commitea954494024cb596aaf9a40c77c3e0fcaf0e0322 (patch)
tree8c35d1e5265608c7c2ec4f88eba66a79709466d1 /src/protocols/TearingControl.hpp
parent5c97b96278da672405527b84019ab50395a9f74f (diff)
core: Move tearing to hyprwayland-scanner (#5657)
Adds a new dependency: hyprwayland-scanner https://github.com/hyprwm/hyprwayland-scanner --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/protocols/TearingControl.hpp')
-rw-r--r--src/protocols/TearingControl.hpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/protocols/TearingControl.hpp b/src/protocols/TearingControl.hpp
index f0dd8bfa..fbd0e1fc 100644
--- a/src/protocols/TearingControl.hpp
+++ b/src/protocols/TearingControl.hpp
@@ -2,21 +2,16 @@
#include <memory>
#include "WaylandProtocol.hpp"
+#include "tearing-control-v1.hpp"
class CWindow;
-
-enum eTearingPresentationHint {
- TEARING_VSYNC = 0,
- TEARING_ASYNC,
-};
-
class CTearingControlProtocol;
class CTearingControl {
public:
- CTearingControl(SP<CWaylandResource> resource_, wlr_surface* surf_);
+ CTearingControl(SP<CWpTearingControlV1> resource_, wlr_surface* surf_);
- void onHint(uint32_t hint_);
+ void onHint(wpTearingControlV1PresentationHint hint_);
bool good();
@@ -29,11 +24,11 @@ class CTearingControl {
}
private:
- void updateWindow();
+ void updateWindow();
- SP<CWaylandResource> resource;
- CWindow* pWindow = nullptr;
- eTearingPresentationHint hint = TEARING_VSYNC;
+ SP<CWpTearingControlV1> resource;
+ CWindow* pWindow = nullptr;
+ wpTearingControlV1PresentationHint hint = PRESENTATION_HINT_VSYNC;
friend class CTearingControlProtocol;
};
@@ -49,10 +44,10 @@ class CTearingControlProtocol : public IWaylandProtocol {
void onGetController(wl_client* client, wl_resource* resource, uint32_t id, wlr_surface* surf);
private:
- void onWindowDestroy(CWindow* pWindow);
+ void onWindowDestroy(CWindow* pWindow);
- std::vector<UP<CWaylandResource>> m_vManagers;
- std::vector<UP<CTearingControl>> m_vTearingControllers;
+ std::vector<UP<CWpTearingControlManagerV1>> m_vManagers;
+ std::vector<UP<CTearingControl>> m_vTearingControllers;
};
namespace PROTO {