[GTK] Tree and table only react delayed on mouse selection if drag listener is configured
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
The report provides a Java reproduction using SWT Tree, Table, and DragSource, but names no repository files or tests. First locate the Linux GTK implementations and related selection/drag tests, then reproduce the behavior with and without the drag listener on Linux. Done means rows become visibly selected and the selection event is sent immediately in both cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Normally, a Tree or Table immediately selects a row on mouse-down. However, this is not the case any more if a drag listener is added to the tree or table.
To Reproduce
- run this snippet
import org.eclipse.swt.*;
import org.eclipse.swt.dnd.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class TreeTableDnD {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final Tree tree = new Tree(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
for (int i = 0; i < 4; i++) {
final TreeItem item = new TreeItem(tree, 0);
item.setText("TreeItem " + i);
}
tree.addListener(SWT.Selection, e -> System.out.println("Tree selection changed"));
final Table table = new Table(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
final TableColumn column = new TableColumn(table, SWT.DEFAULT);
column.setText("Column");
column.setWidth(250);
table.setHeaderVisible(true);
for (int i = 0; i < 4; i++) {
final TableItem item = new TableItem(table, 0);
item.setText("Item " + i);
}
table.addListener(SWT.Selection, e -> System.out.println("Table selection changed"));
// new DragSource(tree, DND.DROP_MOVE).setTransfer(TextTransfer.getInstance());
// new DragSource(table, DND.DROP_MOVE).setTransfer(TextTransfer.getInstance());
shell.setSize(500, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
- select a tree or table row with a slow mouse click -> the visible selection occurs immediately on mouse-down, the selection event is sent delayed
- now remove the comments to active the drag listener and try again -> the visually selection occurs delayed and the selection event even more delayed
Expected behavior
The tree and table rows get visually selected immediately and the selection event is sent immediately, independent of a drag listener.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Tried on Linux Mint (X11)
- Lenguaje dominante
- Java
- Estrellas
- 202
- Forks
- 206
- Merge medio
- 20 h 21 min
- PR fusionados (30 d)
- 110
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-platform/eclipse.platform.swt
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Posiblemente ocupada @GreenFuze la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
eclipse-platform/eclipse.platform.swt#3743 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-platform/eclipse.platform.swt
Issues similares
-
pdfium-drift
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Stirling-Tools/JPDFium#176 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hiero-ledger/hiero-consensus-node#27712 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
Vakore/ZappierGames#162 ·
-
Improve README documentation clarity and fix minor wording issuesPosiblemente ocupada @simplesilence la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
resilience4j/resilience4j#2567 ·
Los mantenedores suelen responder en 6 días
-
Priority/High
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
wso2/dpdp-accelerator#417 ·
Los mantenedores suelen responder en 1 día