Let Chromium size and position PiP windows (Fixes #7391) - #7419
Open
shrijit37 wants to merge 1 commit into
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
freezzby
reviewed
Aug 19, 2026
| keep_aspect_ratio = true, | ||
| border_size = 0, | ||
| opacity = "1 1", | ||
| move = { "(monitor_w-window_w-40)", "(monitor_h*0.04)" }, |
There was a problem hiding this comment.
Seems like the window is now placed in the middle of the screen instead of a corner, tested with Brave and Chromium this move might be still required
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
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.
Fixes #7391
Chromium PiP windows were always forced to 600x338 (16:9) and could open partially off-screen.
Cause: the rules in
default/hypr/apps/pip.luasetsize = { 600, 338 }andkeep_aspect_ratio = true, overriding Chromium's AR-correct PiP sizing; andmove = (monitor_w-window_w-40) ...is evaluated by Hyprland against the window's client-requested (pre-rule) size, so for videos wider thanmonitor_w - 40the x coordinate underflows and the window opens off-screen. The Google Meet rule had the same trio.Change: drop
size,keep_aspect_ratio, andmovefrom both rules. Chromium sizes the PiP to the video's aspect ratio and Hyprland centers it — always fully on-screen.float/pin/borderless overlay behavior is unchanged.Verified: live repro before/after on a Hyprland 0.56.2 session — before: 21:9 video opened at 600x338 positioned from the client's 374x160 request; after: on-screen, aspect ratio follows the video (tested with 21:9 and vertical videos).