What’s the difference between window.get_maximized() and window.fullscreen in a GNOME Shell extension?

I’m trying to understand the difference between a window being maximized and being fullscreen in a GNOME Shell extension.

For example:

  • What exactly does window.get_maximized() check?

  • What does window.fullscreen represent?

  • Can a window be maximized but not fullscreen, or fullscreen but not maximized?

  • When should I use each one if I want to detect whether a window is taking up the entire screen?

A simple example would also be helpful.

Maximized and fullscreen are different states.

A maximized window takes up the entire work area — that’s the monitor area minus “system chrome”, namely the top bar.

A fullscreen window takes up the entire monitor area, including the top bar.

Clients often treat fullscreen windows differently as well, and hide window decoration and controls — think of video players that show nothing but the video when covering the whole monitor.

In visual terms…

VLC playing “Big Buck Bunny”, maximized

VLC playing “Big Buck Bunny”, fullscreened, with controls exposed

(VLC will normally fade away the controller at the bottom-center of the screen, unless the mouse is moved to make it appear.)