Skip to content

Commit 0900a2b

Browse files
committed
fix: use native PiP windows on Wayland
Mark Electron Document Picture-in-Picture windows and teach Chromium Ozone to use the experimental xx-pip-v1 compositor role when available. This removes compositor decorations and gives supported Wayland compositors explicit PiP stacking semantics while retaining the xdg_toplevel fallback elsewhere.
1 parent d8d18c0 commit 0900a2b

5 files changed

Lines changed: 1381 additions & 1 deletion

File tree

lib/browser/guest-window-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ export function openGuestWindow({
4646
}): void {
4747
const { url, frameName, features } = windowOpenArgs;
4848
const { options: parsedOptions } = parseFeatures(features);
49-
const pictureInPictureOptions: BrowserWindowConstructorOptions =
49+
const pictureInPictureOptions: BrowserWindowConstructorOptions & {
50+
_isPictureInPicture?: boolean;
51+
} =
5052
disposition === 'picture-in-picture'
5153
? {
54+
_isPictureInPicture: true,
5255
alwaysOnTop: true,
5356
autoHideMenuBar: true,
5457
frame: false,

patches/chromium/.patches

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,4 @@ revert_remove_the_feature_flag_kdropinputeventswhilepaintholding.patch
163163
fix_disable_enable_resource_allowlist_generation_on_windows.patch
164164
fix_fall_back_to_an_unlocalized_touch_id_prompt_reason_when_the.patch
165165
revert_only_preload_swiftshader_in_gpu_sandbox_init_when_allowed.patch
166+
feat_support_native_picture-in-picture_on_wayland.patch

0 commit comments

Comments
 (0)