File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,20 @@ qint32 ProxyPopupWindow::relativeY() const {
126
126
PopupAnchor* ProxyPopupWindow::anchor () { return &this ->mAnchor ; }
127
127
128
128
void ProxyPopupWindow::reposition () {
129
- if (this ->window != nullptr ) {
130
- PopupPositioner::instance ()->reposition (&this ->mAnchor , this ->window );
129
+ // not gated on pendingReposition as a polish might not be triggered in edge cases
130
+ if (this ->window ) {
131
+ this ->pendingReposition = true ;
132
+ this ->schedulePolish ();
133
+ }
134
+ }
135
+
136
+ void ProxyPopupWindow::onPolished () {
137
+ this ->ProxyWindowBase ::onPolished ();
138
+ if (this ->pendingReposition ) {
139
+ this ->pendingReposition = false ;
140
+
141
+ if (this ->window ) {
142
+ PopupPositioner::instance ()->reposition (&this ->mAnchor , this ->window );
143
+ }
131
144
}
132
145
}
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class ProxyPopupWindow: public ProxyWindowBase {
87
87
88
88
void completeWindow () override ;
89
89
void postCompleteWindow () override ;
90
+ void onPolished () override ;
90
91
91
92
void setScreen (QuickshellScreenInfo* screen) override ;
92
93
void setVisible (bool visible) override ;
@@ -119,4 +120,5 @@ private slots:
119
120
120
121
PopupAnchor mAnchor {this };
121
122
bool wantsVisible = false ;
123
+ bool pendingReposition = false ;
122
124
};
You can’t perform that action at this time.
0 commit comments