mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-11-22 10:35:58 +01:00
csgo-vk-fix: damage monitor if available
This commit is contained in:
parent
755e47790c
commit
56f71160f8
1 changed files with 7 additions and 2 deletions
|
@ -65,9 +65,14 @@ void hkSurfaceDamage(wlr_surface* surface, pixman_region32_t* damage) {
|
||||||
|
|
||||||
const auto SURF = CWLSurface::surfaceFromWlr(surface);
|
const auto SURF = CWLSurface::surfaceFromWlr(surface);
|
||||||
|
|
||||||
if (SURF && SURF->exists() && SURF->getWindow() && SURF->getWindow()->m_szInitialClass == *PCLASS)
|
if (SURF && SURF->exists() && SURF->getWindow() && SURF->getWindow()->m_szInitialClass == *PCLASS) {
|
||||||
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(SURF->getWindow()->m_iMonitorID);
|
||||||
|
if (PMONITOR)
|
||||||
|
g_pHyprRenderer->damageMonitor(PMONITOR);
|
||||||
|
else
|
||||||
g_pHyprRenderer->damageWindow(SURF->getWindow());
|
g_pHyprRenderer->damageWindow(SURF->getWindow());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
||||||
PHANDLE = handle;
|
PHANDLE = handle;
|
||||||
|
|
Loading…
Reference in a new issue