Skip to content

Let Chromium size and position PiP windows (Fixes #7391) - #7419

Open
shrijit37 wants to merge 1 commit into
basecamp:quattrofrom
shrijit37:fix/pip-window-placement
Open

Let Chromium size and position PiP windows (Fixes #7391)#7419
shrijit37 wants to merge 1 commit into
basecamp:quattrofrom
shrijit37:fix/pip-window-placement

Conversation

@shrijit37

Copy link
Copy Markdown
Contributor

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.lua set size = { 600, 338 } and keep_aspect_ratio = true, overriding Chromium's AR-correct PiP sizing; and move = (monitor_w-window_w-40) ... is evaluated by Hyprland against the window's client-requested (pre-rule) size, so for videos wider than monitor_w - 40 the x coordinate underflows and the window opens off-screen. The Google Meet rule had the same trio.

Change: drop size, keep_aspect_ratio, and move from 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).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Comment thread default/hypr/apps/pip.lua
keep_aspect_ratio = true,
border_size = 0,
opacity = "1 1",
move = { "(monitor_w-window_w-40)", "(monitor_h*0.04)" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chromium browser PiP video always falls outside viewport, does not respect video aspect ratio

2 participants