We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d35f37 + ed5b661 commit 6c78f50Copy full SHA for 6c78f50
src/main/java/net/imagej/ui/swing/viewer/image/AbstractSwingImageDisplayViewer.java
@@ -35,6 +35,7 @@
35
import net.imagej.ui.viewer.image.AbstractImageDisplayViewer;
36
37
import org.scijava.display.Display;
38
+import org.scijava.display.DisplayService;
39
import org.scijava.event.EventHandler;
40
import org.scijava.event.EventService;
41
import org.scijava.options.event.OptionsEvent;
@@ -77,6 +78,10 @@ public JHotDrawImageCanvas getCanvas() {
77
78
@Override
79
public void view(final DisplayWindow w, final Display<?> d) {
80
super.view(w, d);
81
+
82
+ // NB: resolve the racing condition when other consumer are looking up the
83
+ // active display
84
+ getContext().service(DisplayService.class).setActiveDisplay(getDisplay());
85
86
dispatcher = new AWTInputEventDispatcher(getDisplay(), eventService);
87
0 commit comments