Skip to content

Commit

Permalink
Fix possible SWTException "Widget is disposed" exception when display…
Browse files Browse the repository at this point in the history
…ing a Tooltip

If a workbench part is detached and a tooltip is initially displayed, when the part is re-attached the parent Shell is disposed which in turn disposes of the PopupHelper's Shell. This will lead to an SWT Error when the Shell is accessed again.

To fix this, create the PopupHelper Shell with the Control's Display instead of its Shell.

See #469
  • Loading branch information
Phillipus authored and ptziegler committed Jul 8, 2024
1 parent c885e76 commit 843e56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion org.eclipse.draw2d/src/org/eclipse/draw2d/PopUpHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected LightweightSystem createLightweightSystem() {
* @since 2.0
*/
protected Shell createShell() {
return new Shell(control.getShell(), shellStyle);
return new Shell(control.getDisplay(), shellStyle);
}

/**
Expand Down

0 comments on commit 843e56c

Please sign in to comment.