internal: store matched windowrules and emit event
new event for plugins, windowUpdateRules
This commit is contained in:
parent
02bfb2857e
commit
56de72f357
4 changed files with 12 additions and 7 deletions
|
|
@ -748,11 +748,13 @@ void CWindow::updateDynamicRules() {
|
|||
m_sAdditionalConfigData.nearestNeighbor = false;
|
||||
m_eIdleInhibitMode = IDLEINHIBIT_NONE;
|
||||
|
||||
const auto WINDOWRULES = g_pConfigManager->getMatchingRules(m_pSelf.lock());
|
||||
for (auto& r : WINDOWRULES) {
|
||||
m_vMatchedRules = g_pConfigManager->getMatchingRules(m_pSelf.lock());
|
||||
for (auto& r : m_vMatchedRules) {
|
||||
applyDynamicRule(r);
|
||||
}
|
||||
|
||||
EMIT_HOOK_EVENT("windowUpdateRules", m_pSelf.lock());
|
||||
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -378,6 +378,9 @@ class CWindow {
|
|||
|
||||
bool m_bTearingHint = false;
|
||||
|
||||
// stores the currently matched window rules
|
||||
std::vector<SWindowRule> m_vMatchedRules;
|
||||
|
||||
// For the list lookup
|
||||
bool operator==(const CWindow& rhs) {
|
||||
return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue