Filter out IME popup toplevels from the taskbar
Hyprland.toplevels included fcitx's "Input" and "Default IME" popup surfaces, which don't appear in hyprctl clients and showed up in the taskbar as icon-less letter buttons. Genuine application windows always have a workspace assigned; these don't, so filter on that. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dujsk9jYfxUVLtb5B8eC94
This commit is contained in:
@@ -375,8 +375,15 @@ Variants {
|
|||||||
// Hyprland.toplevels can silently reorder (e.g. on focus changes),
|
// Hyprland.toplevels can silently reorder (e.g. on focus changes),
|
||||||
// which makes taskbar buttons jump around. Sort by address so each
|
// which makes taskbar buttons jump around. Sort by address so each
|
||||||
// window keeps a stable slot like a real taskbar.
|
// window keeps a stable slot like a real taskbar.
|
||||||
|
//
|
||||||
|
// It also includes things hyprctl clients doesn't (e.g. fcitx's
|
||||||
|
// "Input" / "Default IME" popup toplevels) - those never get a
|
||||||
|
// real workspace assigned, unlike genuine application windows, so
|
||||||
|
// filter on that.
|
||||||
readonly property var sortedToplevels: {
|
readonly property var sortedToplevels: {
|
||||||
var arr = Hyprland.toplevels.values.slice()
|
var arr = Hyprland.toplevels.values.filter(function (tl) {
|
||||||
|
return tl.workspace !== null
|
||||||
|
})
|
||||||
arr.sort(function (a, b) {
|
arr.sort(function (a, b) {
|
||||||
return a.address < b.address ? -1 : (a.address > b.address ? 1 : 0)
|
return a.address < b.address ? -1 : (a.address > b.address ? 1 : 0)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user