-
Couldn't load subscription status.
- Fork 215
Make focusing newly mapped views optional (strict focus stealing prevention) #2627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
dkondor
wants to merge
9
commits into
WayfireWM:master
Choose a base branch
from
dkondor:focus_option
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sponding option is not set
This is necessary as some apps will send the "activate" request before their view is mapped.
…dd environment variables
…run by Wayfire This is required for them to activate if focusing newly mapped views by default is disabled.
Dialogs are identified as a view with a parent. This commit also moves shared code between xdg-shell and xwayland to a common location (toplevel_view_interface_t::focus_toplevel_on_map())
|
I think it's easier with python and a few lines: |
While this is a good workaround in practice, we still switch the focus and then back. Depending on the app, this might not be what we want. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also continuation of #2527 and #2626, creating a (mostly) complete solution for focus stealing prevention.
This adds an option (
core/focus_on_map) that determines whether newly mapped (opened) views are focused. The default istruewhich keeps the current behavior (as I imagine the newly introduced behavior would be too restrictive for most users). When set to false, views must explicitly use the xdg-activation protocol to gain focus, even when first mapped.This PR is organized into 4 parts:
This is currently a draft, since some functionality is still missing:
core. it would be nice to collect all focus stealing / activation related options in one place (i.e. with xdg-activation); however, since this option needs to be accessed from core, I don't like the idea of putting it under a plugin. Maybe an alternative would be introducing one more signal, but that also sounds overkill.