hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.97k stars 913 forks source link

when in group, open float window will be auto grouped, lost the float state #8089

Closed mogamireiki closed 1 month ago

mogamireiki commented 1 month ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 4520b30d498daca8079365bdb909a8dea38e8d55 (version: bump to 0.44.1). Date: Wed Oct 9 12:54:39 2024 Tag: v0.44.1, commits: 5309 built against aquamarine 0.4.2 flags: (if any) System Information: System name: Linux Node name: noire Release: 6.10.13-ml3-125 Version: #1 SMP PREEMPT_DYNAMIC Tue Oct 8 22:51:32 CST 2024 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106 [GeForce RTX 2070] [10de:1f02] (rev a1) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 550.107.02 Wed Jul 24 23:53:00 UTC 2024 os-release: NAME="Mogami Linux" PRETTY_NAME="Mogami Linux" VERSION="3" VERSION_ID="3" ID="mogami-linux" ANSI_COLOR="1;36" plugins: hyprfocus by Vortex ver 2.0 ```

Description

After update to 0.44.0 when the focus in a window in some group, use shortcut open another float window, the new window will be grouped, this time its float status is lost, before 0.44.0 its just floated

the new window's float attr is controlled by: windowrulev2 = float,class:^(pavucontrol(-qt)?)$

if the focus is not in some grouped window, this time open some float window by shortcut is like before hyprland version

I know 0.44.0 add option group:auto_group = true, but when turn it off, all window opened will not be grouped, not just the float window I needed,

or does there are other options i dont find?

How to reproduce

Crash reports, logs, images, videos

No response

Aqa-Ib commented 1 month ago

if I understand you correctly, this rule is what you want: windowrulev2 = group barred,floating:1 this will prevent new floating windows from being auto grouped.

Aqa-Ib commented 1 month ago

IMO, this should be a default behaviour for floating windows.

That would be bad and non-consistent for people that like to work with floating groups.

UPD. And this doesn't work. Floating protonup-qt windows opens in a group, regardless.

I don't know what you are doing but it does work as expected on my end.

Aqa-Ib commented 1 month ago

You are messing up somehow, it is working for me as expected (I tried protonup-qt also with your rules).

Aqa-Ib commented 1 month ago

This doesn't help, unfortunately.

Are you using this rule as-is or else? windowrulev2 = group barred,floating:1 Show your rule.

Also, iirc, floating windows didn't behave, like that, back on 0.43

Correct.

Aqa-Ib commented 1 month ago

Paste your rule here as-is please.

Aqa-Ib commented 1 month ago

You may have some other rule in your config file that is messing it up. It is working for me as expected with the rules that you have pasted until now, except this rule of yours that is bad thoughwindowrulev2 = group barred,class:^$,title:^$,floating:1 it is targetting a window with no class and no titlte.

Aqa-Ib commented 1 month ago

Attach your config file if you want me to help you.

Aqa-Ib commented 1 month ago

I don't know, try latest git then, maybe that is it.

Aqa-Ib commented 1 month ago

I think that using windowrulev2 = group barred,floating:1 is the best approach here.

Aqa-Ib commented 1 month ago

What you don't want is a new floated window automatically merging into a tiled group. That behavior can be achieved with windowrulev2 = group barred,floating:1

If we go back to 0.43 behavior, people would not be able to create new windows into a floating group, which is a good feature to have for a lot of people, and that behavior couldn't be achieved by any window rule.

Aqa-Ib commented 1 month ago

The compromise would be adding that windowrule to the default hyprland.conf

That would add a non-consistent behavior with floating groups that is not intuitive at all as a default.

Aqa-Ib commented 1 month ago

The auto group default behavior is consistent regardless of the floating state of the windows.

This is a niche issue that can be solved easily with a simple window rule and only reproduce if:

  1. you have a tiled group focused and unlocked.
  2. you create a new floated window using a window rule
  3. you don't want it to be merged into the group, but you didn't lock it neither.

If you don't want specific windows to be automatically grouped, just disable this behavior for them with the group barred window rule, it is that simple.

Aqa-Ib commented 1 month ago

Another fix to this issue is locking the focused tiled group before you open your new floating window.

Aqa-Ib commented 1 month ago

Also another fix to this issue would be to just focus another window that is not a unlocked group. This is a consistent behavior in Hyprland, I think that the default is actually good.

Aqa-Ib commented 1 month ago

They are not workarounds, I am just pointing at the default behavior that Hyprland has since the first group rework that happened in early 2023. Version 0.44 just added consistency for floating groups.

mogamireiki commented 1 month ago

if I understand you correctly, this rule is what you want: windowrulev2 = group barred,floating:1 this will prevent new floating windows from being auto grouped.

that's it! this worked for me, Thank you very much!

Aqa-Ib commented 1 month ago

@izmyname I am sorry, yesterday my mind was not clear. This PR fixes this issue without using any window rule and without harming any workflow: https://github.com/hyprwm/Hyprland/pull/8108

Aqa-Ib commented 1 month ago

@mogamireiki with commit e7fd0f5 you don't need any window rule to fix this issue.

mogamireiki commented 1 month ago

@Aqa-Ib Thank you!