Skip to content

fix: mark elevated macOS windows as managed - #7369

Merged
pajlada merged 3 commits into
Chatterino:masterfrom
LosFarmosCTL:fix/macos-always-on-top-mission-control
Oct 24, 2026
Merged

pajlada merged 3 commits into
Chatterino:masterfrom
LosFarmosCTL:fix/macos-always-on-top-mission-control

Conversation

@LosFarmosCTL

Copy link
Copy Markdown
Contributor

Fixes #3681

Elevated macOS windows are by default marked as "transient", and do not show up in any window management surfaces like Mission Control. That makes sense for a lot of use cases (e.g. a screenshot utility that displays a small temporary preview of what you just took), but at least in my opinion is not the expected behavior for a full application window, even if it is displayed always on top.

This manually sets the flag back to managed on windows marked topMost.

Comment thread src/widgets/BaseWindow.cpp Outdated
// elevated window levels default to hiding in Mission Control unless explicitly managed
if (this->isTopMost())
{
setMacOSWindowManaged(*this);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the top level status of a window is changed, do we get a show event as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah good catch, didn't think too much about that and kinda just put the macOS code next to the windows-specific stuff, and while it's just this PR that should actually work fine, because of the way that the window flag is being set here, currently involving a manual show() call:

this->setWindowFlag(Qt::WindowStaysOnTopHint, topMost);
if (isVisible)
{
this->show();
}

But that entire snippet is actually not a great way to do all of this anyways, I've already opened #7370 to replace that exact mechanism, so we should definitely set the window to be managed when applying the flag itself as well, otherwise the other PR is going to break this one (should've just done it as a stacked branch smh).

@LosFarmosCTL
LosFarmosCTL force-pushed the fix/macos-always-on-top-mission-control branch from 3d16d36 to 996b61c Compare October 24, 2026 09:34

@pajlada pajlada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just this comment nit

Comment thread src/widgets/BaseWindow.cpp Outdated
Co-authored-by: pajlada <rasmus.karlsson+github@pajlada.com>
@pajlada
pajlada enabled auto-merge (squash) October 24, 2026 09:48
@pajlada
pajlada merged commit 533fbc9 into Chatterino:master Oct 24, 2026
18 checks passed
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.

Always on top hides chatterino windows from mission control (macOS)

3 participants