[macOS] Delay when closing dialog
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java, macos
- Lĩnh vực
- desktop, desktop-dev
Hướng nghiên cứu
The payload contains only the reproduction snippet, with no source files named. Start by running the snippet on macOS, then find where Display.readAndDispatch() and the Cocoa event loop handle closing a dialog. The bug is confirmed when the dialog stays open during Thread.sleep(4000), and the fix is done when it closes immediately as it does on Windows and Linux.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- All versions of SWT and JFace
- macOS 15, 26 or 27
- Java 25 Temurin
- This problem has always existed
There can be a delay when closing a Dialog (JFace or SWT) on Mac if it's followed by a long running task. This delay does not occur on Windows or Linux where the dialog is closed immediately.
Run the Snippet. On Windows or Linux the dialog or message box closes immediately. On Mac the dialog only closes when the long running task completes.
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
public class DialogCloseDelay {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("Dialog Test");
shell.setLayout(new FillLayout());
shell.setSize(450, 250);
shell.open();
// Same behavior on JFace Dialog or SWT Dialog (MessageBox)
boolean useDialog = true;
if(useDialog) {
Dialog dialog = new Dialog(shell) {};
dialog.open();
}
else {
MessageBox box = new MessageBox(shell);
box.open();
}
// Uncomment this to unfreeze it
// shell.getDisplay().readAndDispatch();
// Long running task
try {
Thread.sleep(4000);
}
catch(InterruptedException e) {}
while(!shell.isDisposed()) {
if(!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
If the following line in the Snippet is uncommented there is no freeze:
shell.getDisplay().readAndDispatch();
- Ngôn ngữ chính
- Java
- Star
- 202
- Fork
- 206
- Merge trung bình
- 21 giờ 55 phút
- Pull request đã merge (30 ngày)
- 110
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-platform/eclipse.platform.swt
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eclipse-platform/eclipse.platform.swt#3761 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Win32] Table tooltip indexes cell font with subitem -1Có thể đã có người làm @fdesbiens đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-platform/eclipse.platform.swt#3752 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Có thể đã có người làm @GreenFuze đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-platform/eclipse.platform.swt
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
code-maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
krizaka/krizaka-notifications#32 ·
Maintainer thường phản hồi trong vòng 1 ngày