Skip to content

Commit

Permalink
update wlroots dep
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Feb 3, 2023
1 parent 129e99a commit a46abd8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/events/Windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions src/managers/XWaylandManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/managers/input/InputMethodRelay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion subprojects/wlroots
Submodule wlroots updated from 5f264a to 677a3f

0 comments on commit a46abd8

Please sign in to comment.