window-management: add 'Raise window on focus' toggle - #2066
window-management: add 'Raise window on focus' toggle#2066perpetualbits wants to merge 1 commit into
Conversation
cd452ca to
995e99c
Compare
|
The PR template is required. |
I have no idea what that is. Please explain or at least give me a pointer in the right direction. You should understand this is the first time I try to contribute to this project. |
|
This repository automatically provides a template for the PR description when creating a PR in GitHub. Your description does not contain the required checklist from that template. |
|
@perpetualbits I'm just trying to speed things up here because I've been (im)patiently waiting for such a feature in COSMIC since day 1. Please please please modify your original post to include this checklist below. It would be a pity if such a critical feature (WHICH COSMIC SHOULD HAVE SUPPORTED FROM DAY 1, smh, let me scream this because it's ridiculous) is blocked simply because of some silly code of conduct-like formality is not satisfied. The checklist appears to be:
|
|
I have to admit I am a bit disheartened by the quite rigid rules around AI
at pop-os.
My patches are commented much better than the code they apply to. Even if
they would not want to apply them wholesale, they (the cosmic developers)
are welcome to cherry pick the ideas in them. I don't mind that at all. The
patches are two-fold: to cosmic-comp and cosmic-settings. But in the
meantime you could apply my patch yourself and install the patched
cosmic-settings and cosmic-comp.
I also made a patch to alacritty and its underlying vte, and that made them
about 50% faster, depending how you define "faster" specifically. Also
patches with no hidden agenda, well-commented and documented but rejected
outright because AI was used. I understand that large contributors really
need to understand the code they are working on. Fair. But for small
contributions that are more or less self-contained, and readily
understandable, I would hope the maintainers can just assess these patches
on their merit. As I said, I don't mind them cherry picking the patches.
That said, there is a bug in the code after all (the not-raise code). Yes,
it works fine when hovering mouse from window to window (underlying window
is not raised when "Raise window on focus" is disabled in my patched
cosmic-settings). But when the mouse cursor leaves an underlying window to
a patch of empty desktop, that underlying window is still raised. I need to
fix that. I am in the Amsterdam time zone and I hope to be able to do that
today, my timezone's today. Working on it now.
…On Tue, 21 Jul 2026 at 14:39, notlaast ***@***.***> wrote:
*notlaast* left a comment (pop-os/cosmic-settings#2066)
<#2066 (comment)>
@perpetualbits <https://github.com/perpetualbits> I'm just trying to
speed things up here because I've been (im)patiently waiting for such a
feature in COSMIC since day 1. Please please please modify your original
post to include this checklist below. It would be a pity if such a critical
feature (WHICH COSMIC SHOULD HAVE SUPPORTED FROM DAY 1, smh, let me scream
this because it's ridiculous) is blocked simply because of some silly code
of conduct-like formality is not satisfied.
The checklist appears to be:
- I have disclosed use of any AI generated code in my commit messages.
- I understand these changes in full and will be able to respond to
review comments.
- My change is accurately described in the commit message.
- My contribution is tested and working as described.
- I have read the Developer Certificate of Origin
<https://developercertificate.org/> and certify my contribution under
its conditions.
—
Reply to this email directly, view it on GitHub
<#2066?email_source=notifications&email_token=A2WL5UN45KFMMSQEOHZPPRL5F5QBZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBTGQYTANJUG4Y2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5034105471>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2WL5UKJMZO5KTWRLUQ5KAT5F5QBZAVCNFSNUABFKJSXA33TNF2G64TZHM2DIMRSGA2DGNJQHNEXG43VMU5TIOBTHA4DAMRRGEYKC5QC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
995e99c to
c181e07
Compare
|
@notlaast thank you — and no worries about the nudge, it's appreciated. I've now completed the required checklist on both PRs. To be upfront: this work While going back through it I found and fixed a bug in the compositor half: with Really appreciate you helping push this along — it's a feature I've wanted for a |
Adds a toggle in the Focus navigation section bound to the compositor's focus_follows_cursor_raise option (default true). It is shown only while focus-follows-cursor is enabled, since raising has no effect without follow-cursor focus. Assisted-by: Claude Code (Anthropic) Signed-off-by: Roland Nagtegaal <perpetualbits@gmail.com>
c181e07 to
19744d9
Compare
| } | ||
| false | ||
| }); | ||
| // Defaults to true so that turning on focus-follows-cursor keeps the |
There was a problem hiding this comment.
suggestion only:
The historical behavior is a UX gaffe; thus part of the fix should be to change the default to focus and not raise, which is what the majority of users who enable focus follows cursor would want. Allow the user to opt in to the historical behavior.
|
Look, I kind of lost interest in pop-os/cosmic.
It surely is the technically superior compositor compared to GNOME, and
they do not monkey-patch all kinds of extensions in the main loop like
GNOME does, and it is written in Rust, and all that.
But I have been running cosmic on my desktop for a few months now and it is
just painful to use. I had to patch the system, to make it useable, meaning
the default choice for hover-to-raise. But they will not even look at the
patches.
The desktop bar and dock crash all the time. At the moment they are all
gone, and I am doing without. Fine, because terminals and a browser is most
of the time all that I use anyway.
But for regular users, cosmic is not close to complete, and has too many
quirks and bugs.
A crew that does not listen to users, even if they go through the trouble
of creating patches and even sending updated versions of them, well, that
is not sustainable to me.
If demand is high I can send an updated patch, out of love, but that is it.
I am no longer going to try and get it merged.
…On Thu, 27 Aug 2026 at 17:10, Gerry Gold ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In cosmic-settings/src/pages/desktop/window_management.rs
<#2066 (comment)>
:
> @@ -50,6 +54,16 @@ impl Default for Page {
}
false
});
+ // Defaults to true so that turning on focus-follows-cursor keeps the
suggestion only:
The historical behavior is a UX gaffe; thus part of the fix should be to
change the default to focus and not raise, which is what the majority of
uses who enable focus follows cursor would want. Allow the user to opt in
to the historical behavior.
—
Reply to this email directly, view it on GitHub
<#2066?email_source=notifications&email_token=A2WL5UMHQK5Z3C5ZBJ6TT435MBFM7A5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMBUGI2DCMBUGE22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#pullrequestreview-5042410415>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2WL5UKVB56GNU5XD2YS3WD5MBFM7AVCNFSNUABFKJSXA33TNF2G64TZHM2DIMRSGA2DGNJQHNEXG43VMU5TIOBTHA4DAMRRGEYKC5QC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Addresses pop-os/cosmic-comp#863.
Summary
Adds a "Raise window on focus" toggle to Settings → Window Management → Focus
navigation. It controls the compositor option
focus_follows_cursor_raise, whichlets focus-follows-cursor move focus without also raising the window ("sloppy
focus").
The toggle sits directly under "Focus follows cursor" and is only shown while
focus-follows-cursor is enabled, since raising has no effect without follow-cursor
focus.
Relationship to cosmic-comp
This pairs with the compositor change that adds the
focus_follows_cursor_raiseoption (pop-os/cosmic-comp#2612). The two are only loosely coupled: this page
reads and writes the raw config key via
comp_config.get/set("focus_follows_cursor_raise"),exactly like the existing
focus_follows_cursortoggle, so it does not dependon the
cosmic-comp-configcrate carrying the new field and compiles againstcurrent
cosmic-comp-configas-is.Implementation
Mirrors the existing focus-navigation toggles:
Message::SetFocusFollowsCursorRaise(bool).Pagefield read on load (defaulttrue, matching the compositor default soexisting behaviour is preserved) and written on toggle.
section.add_maybe(...), gated onfocus_follows_cursor,so it appears only when focus-follows-cursor is on. (A disabled/greyed toggle was
the first instinct, but COSMIC's
togglerdoes not render a disabled switchstate, so a gated toggle would look identical to an enabled one; hiding the row
is unambiguous.)
focus-navigation.focus-follows-cursor-raise = "Raise window on focus".Testing
cargo buildis clean; the changed file produces no warnings;cargo fmtclean.cursor" only when that is enabled, and toggling it writes
focus_follows_cursor_raise,which a compositor with the paired change picks up live.
Screenshots can be added if useful.