Reset appicon container size cache on fullscreen exit

#2129
This commit is contained in:
Charles Gagnon
2025-01-18 19:54:30 -05:00
parent d60439d981
commit 55ec4d1d99

View File

@@ -210,6 +210,16 @@ export const TaskbarAppIcon = GObject.registerClass({
this._titleWindowChangeId = 0;
this._minimizedWindowChangeId = 0;
this._fullscreenId = Utils.DisplayWrapper.getScreen().connect('in-fullscreen-changed', () => {
if (
global.display.focus_window?.get_monitor() == this.dtpPanel.monitor.index &&
!this.dtpPanel.monitor.inFullscreen
) {
this._resetDots(true);
this._displayProperIndicator();
}
})
} else {
this._titleWindowChangeId = this.window.connect('notify::title',
this._updateWindowTitle.bind(this));
@@ -336,6 +346,9 @@ export const TaskbarAppIcon = GObject.registerClass({
if(this._focusWindowChangedId)
global.display.disconnect(this._focusWindowChangedId);
if (this._fullscreenId)
Utils.DisplayWrapper.getScreen().disconnect(this._fullscreenId);
if(this._titleWindowChangeId)
this.window.disconnect(this._titleWindowChangeId);
@@ -506,7 +519,7 @@ export const TaskbarAppIcon = GObject.registerClass({
this._dotsContainer.add_child(this._focusedDots);
}
_resetDots() {
_resetDots(ignoreSizeReset) {
let position = SETTINGS.get_string('dot-position');
let isHorizontalDots = position == DOT_POSITION.TOP || position == DOT_POSITION.BOTTOM;
let sizeProp = isHorizontalDots ? 'width' : 'height';
@@ -518,13 +531,15 @@ export const TaskbarAppIcon = GObject.registerClass({
[, this._containerSize] = this._container[`get_preferred_${sizeProp}`](-1);
[this._focusedDots, this._unfocusedDots].forEach(d => {
d.set_size(-1, -1);
d.x_expand = d.y_expand = false;
if (!ignoreSizeReset) {
[this._focusedDots, this._unfocusedDots].forEach(d => {
d.set_size(-1, -1);
d.x_expand = d.y_expand = false;
d[sizeProp] = 1;
d[(isHorizontalDots ? 'y' : 'x') + '_expand'] = true;
});
d[sizeProp] = 1;
d[(isHorizontalDots ? 'y' : 'x') + '_expand'] = true;
});
}
}
_settingsChangeRefresh() {