Skip to content
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

fix: new_window_takes_over_fullscreen=1, overridingNoMaximise (#6812) #6870

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

nktnet1
Copy link
Contributor

@nktnet1 nktnet1 commented Jul 13, 2024

Describe your PR, what does it fix/add?

Fixes #6812: new_window_takes_over_fullscreen=1 behaves incorrectly for maximise in combination with the default hyprland.conf window rule:

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. 

In short, when we have an existing maximised window, spawning a new window gains focus, but is invisible behind the existing maximised window.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Main discussion point from #6812:

CLICK TO VIEW

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.

Not sure why this was here by default, but it lead to the odd behaviour (bug?) as shown in the video above.

Perhaps this line in the default config can be better documented for new users instead of simply:

# You'll probably like this.

Alternatively, the changes above can be applied to ignore this specific case.

Is it ready for merging, or does it need work?

It should be ready if the changes in this PR is the intended behaviour for the interaction between suppress event and maximise, although it does not appear intuitive (seems buggy).

Another alternative may be to spawn the new window in the background, but don't seize the focus (since there are few, if any, use cases where you would want focus on a hidden window).

Otherwise, I think better documentation/comments can be added to the default window rule for suppressing maximise events for all classes, or at least mention the caveat.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

The reason for that windowrule there is to avoid apps that send maximize requests that annoy the user, which are surprisingly many.

@vaxerski vaxerski merged commit bc6b088 into hyprwm:main Jul 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants