Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#3,717 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
desktop

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
202
Fork
206
Merge trung bình
20 giờ 20 phút
Pull request đã merge (30 ngày)
113

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.swt

Tất cả issue của eclipse-platform/eclipse.platform.swt

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.