screenshot-window-sizer: Adapt to maximization changes

Mutter now exposes the is_maximized() method for checking for
full maximization, and the plain (un)maximize() methods no
longer cover partial maximization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/398>
This commit is contained in:
Florian Müllner
2025-05-07 13:17:56 +02:00
parent 30f4beb3e1
commit b0b0f527be
@@ -70,8 +70,8 @@ export default class ScreenshotWindowSizerExtension extends Extension {
const backwards = binding.is_reversed();
// Unmaximize first
if (window.get_maximized() !== 0)
window.unmaximize(Meta.MaximizeFlags.BOTH);
if (window.is_maximized())
window.unmaximize();
let workArea = window.get_work_area_current_monitor();
let outerRect = window.get_frame_rect();