GTK3: drag source images for tables are blurry on Wayland with fractional scaling
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by running the provided Java reproduction on GTK3 under Wayland at 150% or 166% scaling and inspect the SWT GTK drag-image path that creates Cairo surfaces. The issue points to missing device scale as the cause; confirm where the surface is created and how its scale is set. Done when the reproduced drag image is crisp at fractional scaling without regressing other GTK drag behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
On Linux using GTK3, the images drawn for drag&drop operations are sometimes blurry.
Apparently this is because the Cairo surfaces for drawing the images lack device scale, leading to the images having to be scaled up afterwards, rendering them blurry.
Reproduce using this snippet, running on Wayland with a fractional scale (150% or 166% for example).
import org.eclipse.swt.*;
import org.eclipse.swt.dnd.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class LinuxDndImageBlurTest {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("GTK3 drag image scaling");
shell.setLayout(new GridLayout());
final Label instructions = new Label(shell, SWT.WRAP);
instructions.setText("Drag a row. With display scaling above 100%, the row image is blurry.");
instructions.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
final Table table = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
for (int index = 1; index <= 10; index++) {
final TableItem item = new TableItem(table, SWT.NONE);
item.setText("Drag row " + index + " — sharp text makes scaling artifacts easy to see");
}
// no idea why this is somehow necessary for drag to work in this snippet
display.addFilter(SWT.MouseDown, e -> System.err.println("MouseDown " + e));
final DragSource dragSource = new DragSource(table, DND.DROP_COPY);
dragSource.addDragListener(new DragSourceAdapter() {
@Override
public void dragSetData(DragSourceEvent event) {
event.data = table.getSelection()[0].getText();
}
});
dragSource.setTransfer(TextTransfer.getInstance());
shell.setSize(600, 350);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
Expected behavior
A drag image which is drawn as crisply as the row it's created from.
- Lenguaje dominante
- Java
- Estrellas
- 202
- Forks
- 206
- Merge medio
- 16 h 56 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 3 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 4/5 3-5 días Aptitud para principiantes 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-platform/eclipse.platform.swt
Issues similares
-
agent-java community triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
elastic/apm-agent-java#4594 ·
Los mantenedores suelen responder en 1 día
-
area/plugin good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kestra-io/plugin-soda#137 ·
-
area/plugin good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
kestra-io/plugin-aws#816 ·
Los mantenedores suelen responder en 2 días
-
area/plugin good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
kestra-io/plugin-kestra#200 ·
Los mantenedores suelen responder en 1 día
-
bug untriaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
opensearch-project/search-relevance#618 ·
Los mantenedores suelen responder en 3 días