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

Abierto Apto para principiantes
#14,149 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 8 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
desktop

Línea de trabajo

Empieza en menus.js del applet grouped-window-list y céntrate en addThumbnail() y en la ruta de actualización que llama a set_child_at_index(...). Compara el orden ordenado de appThumbnails con el orden en que se insertan los actores en el cuadro y reproduce el problema con la ordenación activada en paneles de la parte superior e inferior. Se considera terminado cuando la ventana enfocada más recientemente permanece más cerca del applet en ambas posiciones.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
5.7k
Forks
941
Merge medio
7 d 9 h
PR fusionados (30 d)
13

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linuxmint/cinnamon

Todos los issues de linuxmint/cinnamon

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.