Properly update the visible (icon) name when the caption changes

Authored by graesslin on Sep 18 2017, 4:40 PM.



It was possible that we performed an early exit when the caption changes
and this results in the visible name being wrong. E.g if we have two
windows called foo, the second one has the visible name "foo <2>". After
changing that to "bar" the bug resulted in it still being the foo
variant instead of getting cleared.

BUG: 384760
FIXED-IN: 5.11.0

Test Plan

Created new test case exposing the problem

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Sep 18 2017, 4:40 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 18 2017, 4:40 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
broulik added inline comments.

(Oh! I just spotted why that guy on reddit back a while had KWin add loads of spaces to the title of its windows when it contained Unicode control characters that didn't show up in Task Manager but KWin replaced them with spaces)

grahamperrin added a subscriber: grahamperrin.EditedSep 22 2017, 2:50 AM

From under 384760 – absence of proper (current) titles in Task Manager where, for example, many windows are opened in rapid succession by Firefox or SeaMonkey

… As far as I can tell, the patch does fix this bug. …

davidedmundson accepted this revision.Sep 22 2017, 8:41 AM
This revision is now accepted and ready to land.Sep 22 2017, 8:41 AM
This revision was automatically updated to reflect the committed changes.