Skip to content

Conversation

@ids1024
Copy link
Member

@ids1024 ids1024 commented Oct 3, 2025

#1482 renamed set_minimized() to set_suspended(), but didn't rename is_minimized().

But the name may not be ideal either.

https://specifications.freedesktop.org/wm-spec/latest/ar01s05.html says

_NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate that a window would not be visible on the screen if its desktop/viewport were active and its coordinates were within the screen bounds. The canonical example is that minimized windows should be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether to display a window in miniature representations of the windows on a desktop.

While
https://wayland.app/protocols/xdg-shell#xdg_toplevel:enum:state:entry:suspended says:

The surface is currently not ordinarily being repainted; for example because its content is occluded by another window, or its outputs are switched off due to screen locking.

So _NET_WM_STATE_HIDDEN shouldn't be set merely because a window is occluded, or on a different workspace? Both definitions could perhaps be a bit more precise.

It seems to me _NET_WM_STATE_HIDDEN is broader than "minimized", but more specific than the xdg-shell "suspended" state. So just call it "hidden" instead of using some other name.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thanks

Smithay#1482 renamed `set_minimized()`
to `set_suspended()`, but didn't rename `is_minimized()`.

But the name may not be ideal either.

https://specifications.freedesktop.org/wm-spec/latest/ar01s05.html
says

> _NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate
> that a window would not be visible on the screen if its
> desktop/viewport were active and its coordinates were within the
> screen bounds. The canonical example is that minimized windows should
> be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications
> should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether
> to display a window in miniature representations of the windows on a
> desktop.

While
https://wayland.app/protocols/xdg-shell#xdg_toplevel:enum:state:entry:suspended
says:

> The surface is currently not ordinarily being repainted; for example
> because its content is occluded by another window, or its outputs are
> switched off due to screen locking.

So `_NET_WM_STATE_HIDDEN` shouldn't be set merely because a window is
occluded, or on a different workspace? Both definitions could perhaps be
a bit more precise.

It seems to me `_NET_WM_STATE_HIDDEN` is broader than "minimized", but
more specific than the xdg-shell "suspended" state. So just call it
"hidden" instead of using some other name.
@Drakulix Drakulix merged commit d40ada5 into Smithay:master Nov 14, 2025
13 checks passed
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.17%. Comparing base (e04af68) to head (bd9420b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1833      +/-   ##
==========================================
- Coverage   19.15%   17.17%   -1.98%     
==========================================
  Files         177      177              
  Lines       27865    27865              
==========================================
- Hits         5337     4787     -550     
- Misses      22528    23078     +550     
Flag Coverage Δ
wlcs-buffer 16.65% <ø> (ø)
wlcs-core 16.29% <ø> (ø)
wlcs-output 6.86% <ø> (ø)
wlcs-pointer-input ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants