aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-07-18 15:29:54 +0200
committervaxerski <[email protected]>2023-07-18 15:29:54 +0200
commit9421bc6b32b9aabe57e88541f949575169eb818e (patch)
treef3a793e7f6f7847588f6c64458d4ae4a4b7ad73c
parent3a80c726528448bbb6dc18a253fba7ddadaae572 (diff)
downloadHyprland-protocol-rewrite-and-xdg-output.tar.gz
Hyprland-protocol-rewrite-and-xdg-output.zip
add resource version funcprotocol-rewrite-and-xdg-output
-rw-r--r--src/protocols/WaylandProtocol.cpp4
-rw-r--r--src/protocols/WaylandProtocol.hpp1
-rw-r--r--src/protocols/XDGOutput.cpp2
m---------subprojects/wlroots0
4 files changed, 6 insertions, 1 deletions
diff --git a/src/protocols/WaylandProtocol.cpp b/src/protocols/WaylandProtocol.cpp
index 94f48756..b5acffea 100644
--- a/src/protocols/WaylandProtocol.cpp
+++ b/src/protocols/WaylandProtocol.cpp
@@ -30,6 +30,10 @@ wl_resource* CWaylandResource::resource() {
return m_pWLResource;
}
+uint32_t CWaylandResource::version() {
+ return wl_resource_get_version(m_pWLResource);
+}
+
void CWaylandResource::setImplementation(const void* impl, void* data, wl_resource_destroy_func_t df) {
RASSERT(!m_bImplementationSet, "Wayland Resource %lx already has an implementation, cannot re-set!", m_pWLResource);
diff --git a/src/protocols/WaylandProtocol.hpp b/src/protocols/WaylandProtocol.hpp
index aa62c48a..04a58387 100644
--- a/src/protocols/WaylandProtocol.hpp
+++ b/src/protocols/WaylandProtocol.hpp
@@ -9,6 +9,7 @@ class CWaylandResource {
bool good();
wl_resource* resource();
+ uint32_t version();
void setImplementation(const void* impl, void* data, wl_resource_destroy_func_t df);
diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp
index 372f4af6..ab0820e0 100644
--- a/src/protocols/XDGOutput.cpp
+++ b/src/protocols/XDGOutput.cpp
@@ -90,7 +90,7 @@ void CXDGOutputProtocol::onManagerGetXDGOutput(wl_client* client, wl_resource* r
}
pXDGOutput->resource->setImplementation(&OUTPUT_IMPL, this, destroyOutputResourceOnly);
- const auto XDGVER = wl_resource_get_version(pXDGOutput->resource->resource());
+ const auto XDGVER = pXDGOutput->resource->version();
if (XDGVER >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION)
zxdg_output_v1_send_name(pXDGOutput->resource->resource(), PMONITOR->szName.c_str());
diff --git a/subprojects/wlroots b/subprojects/wlroots
-Subproject 7e7633abf09b362d0bad9e3fc650fd692369291
+Subproject 7791ffe0584c4ac13c170e1661ce33bdbd4a9b9