summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-02-03 12:43:43 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-02-03 12:43:43 +0000
commita46abd8b1adaf850e243380ea2a7d6b02677fc86 (patch)
tree0c29f55be26de88d7fb0137c94b99891d0e250b3 /src
parent129e99a6f60eac7ece31a1ccd1e781075fd53050 (diff)
update wlroots dep
Diffstat (limited to 'src')
-rw-r--r--src/events/Windows.cpp2
-rw-r--r--src/managers/XWaylandManager.cpp10
-rw-r--r--src/managers/input/InputMethodRelay.cpp8
-rw-r--r--src/render/Renderer.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index ef02a59d..f283eb5a 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -816,7 +816,7 @@ void Events::listener_activateXDG(wl_listener* listener, void* data) {
Debug::log(LOG, "Activate request for surface at %x", E->surface);
- if (!wlr_surface_is_xdg_surface(E->surface))
+ if (!wlr_xdg_surface_try_from_wlr_surface(E->surface))
return;
const auto PWINDOW = g_pCompositor->getWindowFromSurface(E->surface);
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp
index 765738ef..17efa9a2 100644
--- a/src/managers/XWaylandManager.cpp
+++ b/src/managers/XWaylandManager.cpp
@@ -35,16 +35,16 @@ void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate)
if (!pSurface)
return;
- if (wlr_surface_is_xdg_surface(pSurface)) {
- const auto PSURF = wlr_xdg_surface_from_wlr_surface(pSurface);
+ if (wlr_xdg_surface_try_from_wlr_surface(pSurface)) {
+ const auto PSURF = wlr_xdg_surface_try_from_wlr_surface(pSurface);
if (PSURF && PSURF->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) {
wlr_xdg_toplevel_set_activated(PSURF->toplevel, activate);
}
- } else if (wlr_surface_is_xwayland_surface(pSurface)) {
- wlr_xwayland_surface_activate(wlr_xwayland_surface_from_wlr_surface(pSurface), activate);
+ } else if (wlr_xwayland_surface_try_from_wlr_surface(pSurface)) {
+ wlr_xwayland_surface_activate(wlr_xwayland_surface_try_from_wlr_surface(pSurface), activate);
if (activate)
- wlr_xwayland_surface_restack(wlr_xwayland_surface_from_wlr_surface(pSurface), nullptr, XCB_STACK_MODE_ABOVE);
+ wlr_xwayland_surface_restack(wlr_xwayland_surface_try_from_wlr_surface(pSurface), nullptr, XCB_STACK_MODE_ABOVE);
}
}
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp
index e90f92d9..20057a6a 100644
--- a/src/managers/input/InputMethodRelay.cpp
+++ b/src/managers/input/InputMethodRelay.cpp
@@ -144,8 +144,8 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
Vector2D parentPos;
Vector2D parentSize;
- if (wlr_surface_is_layer_surface(PFOCUSEDSURFACE)) {
- const auto PLS = g_pCompositor->getLayerSurfaceFromWlr(wlr_layer_surface_v1_from_wlr_surface(PFOCUSEDSURFACE));
+ if (wlr_layer_surface_v1_try_from_wlr_surface(PFOCUSEDSURFACE)) {
+ const auto PLS = g_pCompositor->getLayerSurfaceFromWlr(wlr_layer_surface_v1_try_from_wlr_surface(PFOCUSEDSURFACE));
if (PLS) {
parentPos = Vector2D(PLS->geometry.x, PLS->geometry.y) + g_pCompositor->getMonitorFromID(PLS->monitorID)->vecPosition;
@@ -243,8 +243,8 @@ void CInputMethodRelay::damagePopup(SIMEPopup* pPopup) {
const auto PFOCUSEDSURFACE = PFOCUSEDTI->pWlrInput->focused_surface;
- if (wlr_surface_is_layer_surface(PFOCUSEDSURFACE)) {
- const auto PLS = g_pCompositor->getLayerSurfaceFromWlr(wlr_layer_surface_v1_from_wlr_surface(PFOCUSEDSURFACE));
+ if (wlr_layer_surface_v1_try_from_wlr_surface(PFOCUSEDSURFACE)) {
+ const auto PLS = g_pCompositor->getLayerSurfaceFromWlr(wlr_layer_surface_v1_try_from_wlr_surface(PFOCUSEDSURFACE));
if (PLS) {
parentPos = Vector2D(PLS->geometry.x, PLS->geometry.y) + g_pCompositor->getMonitorFromID(PLS->monitorID)->vecPosition;
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 6ff71702..ec73b8e8 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -37,7 +37,7 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
rounding -= 1; // to fix a border issue
if (RDATA->surface && surface == RDATA->surface) {
- if (wlr_surface_is_xwayland_surface(surface) && !wlr_xwayland_surface_from_wlr_surface(surface)->has_alpha && RDATA->fadeAlpha * RDATA->alpha == 1.f) {
+ if (wlr_xwayland_surface_try_from_wlr_surface(surface) && !wlr_xwayland_surface_try_from_wlr_surface(surface)->has_alpha && RDATA->fadeAlpha * RDATA->alpha == 1.f) {
g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true);
} else {
if (RDATA->blur)