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

static window rules are not applied on window open #5703

Open
SetOfAllSets opened this issue Apr 22, 2024 · 10 comments
Open

static window rules are not applied on window open #5703

SetOfAllSets opened this issue Apr 22, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@SetOfAllSets
Copy link

SetOfAllSets commented Apr 22, 2024

Hyprland Version

System/Version info
Hyprland, built from branch HEAD at commit c5e28ebcfe00a510922779b2c568cfa52a317445  (props: bump ver 0.37.1).
Date: Sat Mar 16 14:51:49 2024
Tag: v0.37.1

flags: (if any)


System Information:
System name: Linux
Node name: Gentoo
Release: 6.6.13-gentoo
Version: #22 SMP PREEMPT_DYNAMIC Thu Apr  4 20:42:34 PDT 2024


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile / Max-Q Refresh] [10de:1f14] (rev a1) (prog-if 00 [VGA controller])


os-release: NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.14"


plugins:

Bug or Regression?

Bug

Description

Opening a picture in picture window in ungoogled-chromium does not apply static rules.

How to reproduce

Add windowrulev2 = pin, floating:1 to your config.

Crash reports, logs, images, videos

No response

@SetOfAllSets SetOfAllSets added the bug Something isn't working label Apr 22, 2024
@SetOfAllSets
Copy link
Author

I updated which it did not fix the issue, I've updated the system info to match.

@The-Briel-Deal
Copy link
Contributor

Note this is a guess but, I am able to replicate this, and its for literally all static rules when opening pip in firefox and chromium. I'm guessing the problem is that when a pip is opened. It runs under the same process (notice how in hyprctl clients, it says pid as the same number every firefox and pip window, there is just one firefox process opening windows). I'm gonna dig deeper into this, but I'm thinking that only one evaluation is done per process. But i'll dig deeper into this right now and update when I learn more.

Thanks for the request! Hope things are going well!

@SetOfAllSets
Copy link
Author

Thanks, I hope things are going well for you too. That was also my thinking when I found this.

@The-Briel-Deal
Copy link
Contributor

The-Briel-Deal commented Apr 24, 2024

As an alternative in the interim, I just tested using dispatchers and that works. So you can just set a dispatcher to pin active window and that will work.

hyprctl dispatch pin title:Picture-in-Picture

@The-Briel-Deal
Copy link
Contributor

I also see in the debug logs that it is identifying the spawned window and attempting to apply the static rules when its spawned. But it won't even set it as floating with a window rule.

@SetOfAllSets
Copy link
Author

Interesting. I might use dispatchers for now, thanks for sharing that workaround.

@The-Briel-Deal
Copy link
Contributor

Still trying to figure out the problem here, debugging this has been a little painful but I'm gonna keep working on this. I'll keep this updated with progress.

@The-Briel-Deal
Copy link
Contributor

@SetOfAllSets

I wish I had a more satisfying answer but I must have been making some mistake earlier. For some reason it is working as expected now that I have the config correct. Please try the following for this to work in firefox pip, and replace dashes with spaces for chromium.

Use

windowrulev2=float,title:^(Picture-in-Picture)$
windowrulev2=pin,title:^(Picture-in-Picture)$

Make sure float comes first and pin comes second.

Let me know how this works.

@SetOfAllSets
Copy link
Author

It works, thanks!

@vaxerski
Copy link
Member

vaxerski commented May 9, 2024

can this be closed then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants