!7 cmodule FullscreenImage > DynImageSurface { switchable bool noScroll = true; // workaround for weird unnecessary scrollbars (TODO: find out why that happens) transient ImageSurface fullScreenIS; visual withCenteredButtons(super, "Show fullscreen", rThread showFullscreen); void showFullscreen enter { if (!hasImage()) ret; if (fullScreenIS != null) activateFrame(fullScreenIS); fullScreenIS = showFullScreenImageSurface_noScroll(getImage()); onFrameClose(fullScreenIS, r { fullScreenIS = null; }); } void exitFullscreen enter { disposeFrame(fullScreenIS); } }