I am trying to get this done:

* Move the cursor to the top right corner of the screen and click the close button to close a maximized window.

instead of this:

* Move the cursor to the top-right corner of the screen and then move it slightly back towards the bottom-left direction in order to click the close button.

The first one is much faster and feels more comfortable. It seems to work with some (maybe most) programs, but not with all.

Some programs where it is working: Nemo, VirtualBox, Chromium, LibreOffice (Writer, Calc, Draw, Impress), GParted, Atom, Audacity, VLC media player.

Some programs where it is not working: Nautilus, Gedit, Terminal, Firefox, Settings, Image Viewer.

How to get it working for all programs? Thanks.

I tried this extension but don't know how to configure it to close a maximized window: <https://extensions.gnome.org/extension/1362/custom-hot-corners/>

A screenshot of a maximized window in case it is needed:

[![screenshot of a maximized window](https://i.stack.imgur.com/bY51e.png)](https://i.stack.imgur.com/bY51e.png)