Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[GTK] Remove forceResize() from getClientArea on Wayland and the org.eclipse.swt.resizeOnGetClientArea property

Aperta
#3,717 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
desktop

Direzione di ricerca

Start in the GTK Scrollable, Composite, Table and Tree classes, where RESIZE_ON_GETCLIENTAREA guards the forceResize() call in getClientAreaInPixels(). Read the history of commit ff04b1368c and Bug 484682 before changing anything. Done means the constant, the four guarded calls and the org.eclipse.swt.resizeOnGetClientArea property are removed, and the PDE API Baseline dialog and JDT Pull Down wizard still render correctly on Wayland.

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

Descrizione

On GTK, Scrollable, Composite, Table and Tree call forceResize() in getClientAreaInPixels() only when RESIZE_ON_GETCLIENTAREA is set:

static final boolean RESIZE_ON_GETCLIENTAREA = OS.isWayland() || Boolean.getBoolean("org.eclipse.swt.resizeOnGetClientArea");

Bug 484682 removed the call in 2020 because a getter changing widget state led to a stack overflow.
The -Dorg.eclipse.swt.resizeOnGetClientArea=true property was added as an escape hatch to the old behavior, and nothing in the Eclipse projects sets it.
Shortly after, the call was restored for Wayland only (ff04b1368c, "temporary workaround"), because the PDE API Baseline edit dialog and the JDT Pull Down wizard rendered wrongly on GTK 3.24.14 under Wayland.
The follow-up, Bug 563191, was never worked on.

A check on GTK 3.24.52 under a headless Wayland compositor found no remaining need for it.
JFace wizard dialogs modeled on the two reported ones (a checkbox tree page, a checkbox table sizing its columns from getClientArea()) and a ScrolledComposite sized from getClientArea() produced identical bounds, client areas and column widths for all 106 controls with and without the forced resize.
Instrumenting the call sites showed that none of the 186 forceResize() calls made through getClientArea() changed the allocation that is returned afterwards.

Proposal: remove RESIZE_ON_GETCLIENTAREA, the four forceResize() calls it guards, and with it the org.eclipse.swt.resizeOnGetClientArea system property, so that Wayland and X11 behave the same.
Before merging, the real PDE API Baseline edit dialog and the JDT Pull Down wizard should be opened once on Wayland with the change.

Lingua principale
Java
Stelle
202
Fork
206
Merge medio
14h 7m
PR unite (30g)
103

Preparare l'ambiente

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 eclipse-platform/eclipse.platform.swt

Tutte le issue di eclipse-platform/eclipse.platform.swt

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.