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

Đang mở Phù hợp với người mới
#14,149 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 8 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu trong menus.js của applet grouped-window-list, tập trung vào addThumbnail() và đường cập nhật gọi set_child_at_index(...). So sánh thứ tự đã sắp xếp của appThumbnails với thứ tự các actor được chèn vào hộp, sau đó tái hiện lỗi khi bật sắp xếp trên các thanh panel ở phía trên và phía dưới. Hoàn tất khi cửa sổ được focus gần đây nhất vẫn nằm gần applet nhất ở cả hai vị trí.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
5.7k
Fork
941
Merge trung bình
7 ngày 9 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linuxmint/cinnamon

Tất cả issue của linuxmint/cinnamon

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.