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 {
40
40
}
41
41
42
42
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 ];
44
45
if (!panels.contains (panel)) {
45
46
panels.push_back (panel);
46
47
}
47
48
}
48
49
49
50
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 ];
51
54
if (panels.removeOne (panel)) {
52
55
if (panels.isEmpty ()) {
53
- this ->mPanels .erase (EngineGeneration::findObjectGeneration ( panel) );
56
+ this ->mPanels .erase (panel-> engineGeneration );
54
57
}
55
58
56
59
// from the bottom up, update all panels
@@ -61,7 +64,8 @@ class XPanelStack {
61
64
}
62
65
63
66
void updateLowerDimensions (XPanelWindow* exclude) {
64
- auto & panels = this ->mPanels [EngineGeneration::findObjectGeneration (exclude)];
67
+ if (!exclude->engineGeneration ) return ;
68
+ auto & panels = this ->mPanels [exclude->engineGeneration ];
65
69
66
70
// update all panels lower than the one we start from
67
71
auto found = false ;
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ private slots:
98
98
Margins mMargins ;
99
99
qint32 mExclusiveZone = 0 ;
100
100
ExclusionMode::Enum mExclusionMode = ExclusionMode::Auto;
101
+ EngineGeneration* knownGeneration = nullptr ;
101
102
102
103
QRect lastScreenVirtualGeometry;
103
104
XPanelEventFilter eventFilter;
You can’t perform that action at this time.
0 commit comments