Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3c8f201

Browse files
macOS touchbar: Run event handler later to prevent hanging if a dialog needs to be open
1 parent 980b70e commit 3c8f201

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎app/src/processing/app/EditorToolbar.java‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,15 @@ private void buildTouchBar() {
188188

189189
touchBarButtons[i] = new TouchBarButton();
190190
touchBarButtons[i].setImage(touchBarImages[i][ROLLOVER]);
191-
touchBarButtons[i].setAction(event -> handleSelectionPressed(selection));
191+
touchBarButtons[i].setAction(event -> {
192+
// Run event handler later to prevent hanging if a dialog needs to be open
193+
EventQueue.invokeLater(new Runnable() {
194+
@Override
195+
public void run() {
196+
handleSelectionPressed(selection);
197+
}
198+
});
199+
});
192200

193201
TouchBarItem touchBarItem = new TouchBarItem(title[i], touchBarButtons[i], true);
194202
touchBarItem.setCustomizationLabel(title[i]);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /