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 {
126126PopupAnchor* ProxyPopupWindow::anchor () { return &this ->mAnchor ; }
127127
128128void 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+ }
131144 }
132145}
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class ProxyPopupWindow: public ProxyWindowBase {
8787
8888 void completeWindow () override ;
8989 void postCompleteWindow () override ;
90+ void onPolished () override ;
9091
9192 void setScreen (QuickshellScreenInfo* screen) override ;
9293 void setVisible (bool visible) override ;
@@ -119,4 +120,5 @@ private slots:
119120
120121 PopupAnchor mAnchor {this };
121122 bool wantsVisible = false ;
123+ bool pendingReposition = false ;
122124};
You can’t perform that action at this time.
0 commit comments