File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,20 @@ class XPanelStack {
4040 }
4141
4242 void addPanel (XPanelWindow* panel) {
43- auto & panels = this ->mPanels [EngineGeneration::findObjectGeneration (panel)];
43+ panel->engineGeneration = EngineGeneration::findObjectGeneration (panel);
44+ auto & panels = this ->mPanels [panel->engineGeneration ];
4445 if (!panels.contains (panel)) {
4546 panels.push_back (panel);
4647 }
4748 }
4849
4950 void removePanel (XPanelWindow* panel) {
50- auto & panels = this ->mPanels [EngineGeneration::findObjectGeneration (panel)];
51+ if (!panel->engineGeneration ) return ;
52+
53+ auto & panels = this ->mPanels [panel->engineGeneration ];
5154 if (panels.removeOne (panel)) {
5255 if (panels.isEmpty ()) {
53- this ->mPanels .erase (EngineGeneration::findObjectGeneration ( panel) );
56+ this ->mPanels .erase (panel-> engineGeneration );
5457 }
5558
5659 // from the bottom up, update all panels
@@ -61,7 +64,8 @@ class XPanelStack {
6164 }
6265
6366 void updateLowerDimensions (XPanelWindow* exclude) {
64- auto & panels = this ->mPanels [EngineGeneration::findObjectGeneration (exclude)];
67+ if (!exclude->engineGeneration ) return ;
68+ auto & panels = this ->mPanels [exclude->engineGeneration ];
6569
6670 // update all panels lower than the one we start from
6771 auto found = false ;
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ private slots:
9898 Margins mMargins ;
9999 qint32 mExclusiveZone = 0 ;
100100 ExclusionMode::Enum mExclusionMode = ExclusionMode::Auto;
101+ EngineGeneration* knownGeneration = nullptr ;
101102
102103 QRect lastScreenVirtualGeometry;
103104 XPanelEventFilter eventFilter;
You can’t perform that action at this time.
0 commit comments