grouped-window-list: thumbnail order depends on panel position when "Sort thumbnails according to the last focused windows" is enabled

オープン 初心者向け
#14,149 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
desktop

調査の方向性

grouped-window-list アプレットの menus.js から始め、addThumbnail() と set_child_at_index(...) を呼び出す更新経路に注目します。ソート済みの appThumbnails の順序と、アクターがボックスに挿入される順序を比較し、上部と下部のパネルでソートを有効にして再現します。どちらの位置でも、最後にフォーカスされたウィンドウがアプレットに最も近い位置に保たれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Environment

  • Cinnamon 6.6.7 (Gentoo, X11), applet [email protected]
  • Panel at the bottom of the screen (the common/default position)
  • Applet setting "Sort thumbnails according to the last focused windows" (sort-thumbnails) enabled (default is false)

Problem

With that setting enabled, the thumbnail popup of a grouped application behaves inconsistently with respect to the panel position:

  1. Panel at the bottom (default): the most recently focused window - the whole point of the sort setting - ends up at the far end of the thumbnail row, i.e. the end furthest from the applet button. Reaching it means sweeping the pointer across the entire row of thumbnails. (And with hover-peek enabled this additionally raises every window the pointer crosses on the way.)
  2. Panel moved to the top of the screen: the very same window is placed adjacent to the applet, first in the row, and is reachable immediately.

In other words, the ordering/flip direction of the thumbnail row changes with the panel position, so the most recently used window is not reliably next to the panel button. As a workaround I had to move my whole panel from the bottom to the top of the screen because of this one setting.

Expected behaviour

The visual order of the thumbnail row should be independent of where the panel sits: with sorting enabled, the last focused window should always be the thumbnail closest to the applet/entry point (or the fill direction should be a user-configurable option), so a user with the panel at the bottom can reach the recently used window without crossing the whole list.

Code-level observation

In addThumbnail() (menus.js) the appThumbnails array is sorted by user_time descending (b.user_time - a.user_time), but the thumbnail actor is inserted with this.box.insert_actor(thumbnail.actor, -1) - always appended at the end of the box layout; only the refresh path uses this.box.set_child_at_index(...) with the sorted index. The menu itself is anchored to the source actor (super._init.call(this, groupState.trigger('getActor'), state.orientation, 0.5)), so the visible row order depends on how the popup is placed relative to the panel. The array order and the visible box order therefore diverge, and the divergence flips with the panel position - which matches the behaviour described above.

Happy to provide more details (screenshots/repro steps) if useful.

主要言語
JavaScript
スター
5.7k
フォーク
941
平均マージ
7日 9時間
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon のほかの issue

linuxmint/cinnamon の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。