The widget lost sync on too many opened windows
After long testing I can confirm that window titles stop being synched after a few minutes when the number of open windows reaches a certain threshold. I have indeed ~180 Firefox open windows now and application title bar started to lose the synchronization with the active window in a few minutes after restoring the browser session. This doesn't happen if the number of open windows is lower than 15-20, maybe something more.
Originally posted by @frasty in https://github.com/antroids/application-title-bar/issues/30#issuecomment-2538244947
I've tried to reproduce it by opening 80 firefox windows, but everything works fine.
test_page_param.html
<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const param = urlParams.get('param');
document.title = "[" + param + "]Test page with param";
</script>
</head>
<body>body</body>
</html>
bash:
for i in {1..80}; do sh -c "firefox -new-window file:///test_page_param.html?param=$i" & done
I managed to record a screencast. As you can see I have four desktops/two screens. Application title bar doesn't update the window titles only for desktop 1, where most of my windows are located (~80). If I switch to the window whose title is stuck on application title bar, then a window title from another apparently random window is shown. Otherwise on desktop 3, where only a few windows are located, window titles are synched fine. On the right screen of desktop 3 you can see the configuration window of the widget.
I have also attached a snippet from my user journal related to the widget. Maybe these records are totally unrelated, idk: application-title-bar.log
Have you moved the windows between virtual desktops?
It seems the activeTask value calculated in a wrong way when you move windows between the virtual desktops. The same issue is with TaskManager widget.
Steps to reproduce:
- Add second virtual desktop.
- Open some window on the second virtual desktop.
- Open two windows on the first virtual desktop.
- Enter Overview mode.
- Move bottom window from the first virtual desktop to the second.
Expected result: active window selected in the taskbar on the second virtual desktop.
Actual result: bottom window selected in the taskbar on the second virtual desktop.
Idk what triggers the loss of synchronization for the activetask. It seems to me fairly random. The stuck activetask updates only after moving the window to another virtual desktop. Lately I removed all the virtual desktops just to see if the issue would still appear and yes, unfortunately it is still there. After some random time activetask get stuck and loses sync, so virtual desktops might not be the trigger. I still make use of activities, though.