Skip to content

Drop extra KWin 5 win title suffix right away

Remove the special window title suffixes that get added by KWin 5 from right where the windo infos are retrieved for the corresponding window manager implementation, i.e.

  • to WindowManager#getWindowInfos (with an "s" at the end) for Wnck
  • to the KWin 5 script for the case that KWinWindowManager is used with KWin 5.

This way, matching the name received from the window manager against the one received from AT-SPI2 doesn't only work in WindowManager#getWindowInfo, but also for the "Inspect object under mouse" feature: QuickSelect#inspectUnderMouse tries to match the a11y name for the frame retrieved via AT-SPI2 with a list of window infos retrieved via the window manager, which previously failed if the corresponding window had got a suffix, e.g. was called "Spelling: [None] <2>" for a LibreOffice spellcheck dialog window when multiple instances where running at the same time.

The KWin 6 script doesn't need that, as KWin 6 no longer adds such a suffix, see KWin commit [1]:

commit aac5d562fbcfcea7124a71bbdf9ea647e6114f2d
Author: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date:   Thu Jan 11 16:52:26 2024 +0200

    Drop "<N>" window caption suffix

    The current implementation of the `<N>` suffix is still buggy and its
    benefits are doubtful. One could argue that visual aids such as window
    thumbnails or highlighting the windows are better. On its own, these
    numbers don't have strong connections to the windows and can change on
    a whim.

[1] https://invent.kde.org/plasma/kwin/-/commit/aac5d562fbcfcea7124a71bbdf9ea647e6114f2d

Merge request reports

Loading