Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
macOS touchbar: Run event handler later to prevent hanging if a dialo…
…g needs to be open
  • Loading branch information
sandeepmistry committed Jan 24, 2019
commit 3c8f20102467bc2ae166a0ccf6ae8ee32ae9c89d
10 changes: 9 additions & 1 deletion app/src/processing/app/EditorToolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@ private void buildTouchBar() {

touchBarButtons[i] = new TouchBarButton();
touchBarButtons[i].setImage(touchBarImages[i][ROLLOVER]);
touchBarButtons[i].setAction(event -> handleSelectionPressed(selection));
touchBarButtons[i].setAction(event -> {
// Run event handler later to prevent hanging if a dialog needs to be open
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
handleSelectionPressed(selection);
}
});
});

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