mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 21:51:55 -07:00
pointer: use preMonitorCommit for resetting render state
in DS preRender is not called
This commit is contained in:
@@ -863,6 +863,8 @@ bool CMonitorState::commit() {
|
|||||||
if (!updateSwapchain())
|
if (!updateSwapchain())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
EMIT_HOOK_EVENT("preMonitorCommit", m_pOwner);
|
||||||
|
|
||||||
ensureBufferPresent();
|
ensureBufferPresent();
|
||||||
|
|
||||||
bool ret = m_pOwner->output->commit();
|
bool ret = m_pOwner->output->commit();
|
||||||
|
@@ -25,7 +25,7 @@ CPointerManager::CPointerManager() {
|
|||||||
nullptr);
|
nullptr);
|
||||||
});
|
});
|
||||||
|
|
||||||
hooks.monitorPreRender = g_pHookSystem->hookDynamic("preRender", [this](void* self, SCallbackInfo& info, std::any data) {
|
hooks.monitorPreRender = g_pHookSystem->hookDynamic("preMonitorCommit", [this](void* self, SCallbackInfo& info, std::any data) {
|
||||||
auto state = stateFor(std::any_cast<CMonitor*>(data)->self.lock());
|
auto state = stateFor(std::any_cast<CMonitor*>(data)->self.lock());
|
||||||
if (!state)
|
if (!state)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user