Go to home page (close all screens) on header logo click

Is it possible to close all screens when the user presses the site logo on the header to achieve a “go to home page” effect?

You can close all windows using removeAll method of Screens bean (CUBA 7.0+), e.g:

    private Screens screens;

    public void closeAll() {

You need to create custom main window in order to add click listener to the logo image. The easiest way to do it - create corresponding screen (main window) in CUBA Studio:

public class ExtAppMainWindow extends AppMainWindow {

    private Image logoImage;

    public void init(Map<String, Object> params) {
        logoImage.addClickListener(clickEvent -> {