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

Aperta Adatta ai principianti
#14,149 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
desktop

Direzione di ricerca

Inizia in menus.js dell’applet grouped-window-list e concentrati su addThumbnail() e sul percorso di aggiornamento che chiama set_child_at_index(...). Confronta l’ordine ordinato di appThumbnails con l’ordine in cui gli attori vengono inseriti nella casella, quindi riproduci il problema con l’ordinamento attivato sui pannelli in alto e in basso. Il lavoro è completato quando la finestra che ha ricevuto il focus più di recente rimane la più vicina all’applet in entrambe le posizioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
5.7k
Fork
941
Merge medio
7g 9h
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di linuxmint/cinnamon

Tutte le issue di linuxmint/cinnamon

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.