WindowSwitcher: Update caption width before opening (#1645)

This commit is contained in:
Leo 2023-04-11 20:25:04 +09:00 committed by GitHub
parent 7c379480d3
commit 4d1fcace10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,6 +291,9 @@ namespace Gala {
canvas.set_size ((int) nat_width, switcher_height);
canvas.invalidate ();
// container width might have changed, so we must update caption width too
update_caption_text ();
set_position (
(int) (geom.x + (geom.width - width) / 2),
(int) (geom.y + (geom.height - height) / 2)