mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:25:58 +01:00
fix crash
This commit is contained in:
parent
3e9a8a7bc8
commit
3cb30e7fb0
1 changed files with 7 additions and 3 deletions
|
@ -32,9 +32,13 @@ wlr_surface* CHyprXWaylandManager::getWindowSurface(CWindow* pWindow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) {
|
void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) {
|
||||||
if (wlr_surface_is_xdg_surface(pSurface))
|
if (wlr_surface_is_xdg_surface(pSurface)) {
|
||||||
wlr_xdg_toplevel_set_activated(wlr_xdg_surface_from_wlr_surface(pSurface)->toplevel, activate);
|
const auto PSURF = wlr_xdg_surface_from_wlr_surface(pSurface);
|
||||||
else if (wlr_surface_is_xwayland_surface(pSurface)) {
|
|
||||||
|
if (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);
|
wlr_xwayland_surface_activate(wlr_xwayland_surface_from_wlr_surface(pSurface), activate);
|
||||||
|
|
||||||
if (activate)
|
if (activate)
|
||||||
|
|
Loading…
Reference in a new issue