hyprwm / hyprland-plugins

Official plugins for Hyprland
BSD 3-Clause "New" or "Revised" License
459 stars 42 forks source link

Hyprwinwrap causes apps to crash Hyprland #185

Open nnra6864 opened 2 weeks ago

nnra6864 commented 2 weeks ago

I am on Arch, Hyprland Git and Hyprpm updated properly. If I enable Hyprwinwrap and open an app such as kitty or telegram, the entire Hyprland session crashes. Here's the latest crash log I got: hyprlandCrashReport7477.txt Here's a plugin related part of my config too:

plugin {
    hyprwinwrap {
    class = GLava
    }
}
NyxTrail commented 2 weeks ago

Can confirm similar crashes with hyprwinwrap enabled and launching kitty. hyprlandCrashReport333745.txt

vaxerski commented 2 weeks ago

patch.txt try this

nnra6864 commented 2 weeks ago

patch.txt try this

I added the if check you sent and now it just crashes as soon as I enable the plugin. Here's the latest crash report: hyprlandCrashReport103825.txt As well as the function I changed(in case I missed something):

void onCommitSubsurface(CSubsurface* thisptr) {
    if (!thisptr->m_pWLSurface) {
        ((origCommitSubsurface)subsurfaceHook->m_pOriginal)(thisptr);
        return;
    }

    const auto PWINDOW = thisptr->m_pWLSurface->getWindow();

    if (!PWINDOW || std::find_if(bgWindows.begin(), bgWindows.end(), [PWINDOW](const auto& ref) { return ref.lock() == PWINDOW; }) == bgWindows.end()) {
        ((origCommitSubsurface)subsurfaceHook->m_pOriginal)(thisptr);
        return;
    }

    // cant use setHidden cuz that sends suspended and shit too that would be laggy
    PWINDOW->m_bHidden = false;

    ((origCommitSubsurface)subsurfaceHook->m_pOriginal)(thisptr);
    if (const auto MON = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); MON)
        g_pHyprOpenGL->markBlurDirtyForMonitor(MON);

    PWINDOW->m_bHidden = true;
}
jDmacD commented 2 weeks ago

same on nixos / home-manager

crash report