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

Youtube picture in picture gets tiled instead of floating window. #246

Open
asnimansari opened this issue May 29, 2024 · 13 comments
Open

Youtube picture in picture gets tiled instead of floating window. #246

asnimansari opened this issue May 29, 2024 · 13 comments

Comments

@asnimansari
Copy link

asnimansari commented May 29, 2024

Youtube picture in picture mode, gets tiled instead of floating window.
image

How to replicate

  1. Open youtube.com
  2. Play any video
  3. Right Click the video twice to get the above menu.
  4. Select Picture in Picture mode
@nikitabobko
Copy link
Owner

  1. What browser do you use?
  2. Please capture picture-in-picture debug info with debug-windows command

@asnimansari
Copy link
Author

  1. Google Chrome
rg.alacritty.window.2650 windowId: 2650
org.alacritty.window.2650 workspace: 1
org.alacritty.window.2650 treeNodeParent: AppBundle.TilingContainer
org.alacritty.window.2650 recognizedAsDialog: false
org.alacritty.window.2650 AXTitle: Optional(aerospace debug-windows)
org.alacritty.window.2650 AXRole: Optional(AXWindow)
org.alacritty.window.2650 AXSubrole: Optional(AXStandardWindow)
org.alacritty.window.2650 AXFocused: Optional(1)
org.alacritty.window.2650 AXFullScreen: Optional(0)
org.alacritty.window.2650 AXFrame: Optional(<AXValue 0x600001e7d1c0> {value = x:-0.000000 y:44.000000 w:600.000000 h:1124.000000 type = kAXValueCGRectType})
org.alacritty.window.2650 AXPosition: Optional(<AXValue 0x60000054d440> {value = x:-0.000000 y:44.000000 type = kAXValueCGPointType})
org.alacritty.window.2650 AXGrowArea: nil
org.alacritty.window.2650 AXMinimizeButton: AXUIElement {
org.alacritty.window.2650      AXRole: Optional(AXButton)
org.alacritty.window.2650      AXTitle: nil
org.alacritty.window.2650      AXSubrole: Optional(AXMinimizeButton)
org.alacritty.window.2650      AXEnabled: Optional(1)
org.alacritty.window.2650      AXParent: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXTopLevelUIElement: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
org.alacritty.window.2650 }
org.alacritty.window.2650 AXDocument: nil
org.alacritty.window.2650 AXSections: [
org.alacritty.window.2650         Optional({
org.alacritty.window.2650             SectionDescription = Content;
org.alacritty.window.2650             SectionObject = "<AXUIElement 0x600000548a80> {pid=35093}";
org.alacritty.window.2650             SectionUniqueID = AXContent;
org.alacritty.window.2650         })
org.alacritty.window.2650 ]
org.alacritty.window.2650 AXCloseButton: AXUIElement {
org.alacritty.window.2650      AXRole: Optional(AXButton)
org.alacritty.window.2650      AXTitle: nil
org.alacritty.window.2650      AXSubrole: Optional(AXCloseButton)
org.alacritty.window.2650      AXEnabled: Optional(1)
org.alacritty.window.2650      AXParent: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXTopLevelUIElement: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
org.alacritty.window.2650 }
org.alacritty.window.2650 AXMain: Optional(1)
org.alacritty.window.2650 AXActivationPoint: Optional(<AXValue 0x6000005487e0> {value = x:70.000000 y:58.000000 type = kAXValueCGPointType})
org.alacritty.window.2650 AXFullScreenButton: AXUIElement {
org.alacritty.window.2650      AXRole: Optional(AXButton)
org.alacritty.window.2650      AXTitle: nil
org.alacritty.window.2650      AXSubrole: Optional(AXFullScreenButton)
org.alacritty.window.2650      AXEnabled: Optional(1)
org.alacritty.window.2650      AXParent: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXTopLevelUIElement: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
org.alacritty.window.2650 }
org.alacritty.window.2650 AXProxy: nil
org.alacritty.window.2650 AXDefaultButton: nil
org.alacritty.window.2650 AXMinimized: Optional(0)
org.alacritty.window.2650 AXParent: Optional(<AXUIElement Application 0x60000056c810> {pid=35093})
org.alacritty.window.2650 AXTitleUIElement: AXUIElement(windowId=2650, title=nil, role="AXStaticText", subrole=nil)
org.alacritty.window.2650 AXCancelButton: nil
org.alacritty.window.2650 AXModal: Optional(0)
org.alacritty.window.2650 AXZoomButton: AXUIElement {
org.alacritty.window.2650      AXRole: Optional(AXButton)
org.alacritty.window.2650      AXTitle: nil
org.alacritty.window.2650      AXSubrole: Optional(AXFullScreenButton)
org.alacritty.window.2650      AXEnabled: Optional(1)
org.alacritty.window.2650      AXParent: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXTopLevelUIElement: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      AXWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty.window.2650      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
org.alacritty.window.2650 }
org.alacritty.window.2650 AXSize: Optional(<AXValue 0x600000548960> {value = w:600.000000 h:1124.000000 type = kAXValueCGSizeType})
org.alacritty.window.2650 AXToolbarButton: nil
org.alacritty.window.2650 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
org.alacritty             AXRole: Optional(AXApplication)
org.alacritty             AXTitle: Optional(Alacritty)
org.alacritty             AXFunctionRowTopLevelElements: [
org.alacritty             ]
org.alacritty             AXFrame: nil
org.alacritty             AXFocusedUIElement: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty             AXFrontmost: Optional(1)
org.alacritty             AXExtrasMenuBar: nil
org.alacritty             AXMainWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty             AXFocusedWindow: AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty             AXMenuBar: Optional(<AXUIElement 0x60000054d440> {pid=35093})
org.alacritty             AXWindows: [
org.alacritty                 AXUIElement(windowId=2650, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
org.alacritty             ]
org.alacritty             AXSize: nil
org.alacritty             AXPosition: nil
org.alacritty             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

com.google.Chrome.window.2692 windowId: 2692
com.google.Chrome.window.2692 workspace: 1
com.google.Chrome.window.2692 treeNodeParent: AppBundle.TilingContainer
com.google.Chrome.window.2692 recognizedAsDialog: false
com.google.Chrome.window.2692 AXTitle: Optional(Picture-in-picture)
com.google.Chrome.window.2692 AXRole: Optional(AXWindow)
com.google.Chrome.window.2692 AXSubrole: Optional(AXStandardWindow)
com.google.Chrome.window.2692 AXFocused: Optional(0)
com.google.Chrome.window.2692 AXFullScreen: Optional(0)
com.google.Chrome.window.2692 AXFrame: Optional(<AXValue 0x600001e2aa40> {value = x:600.000000 y:44.000000 w:1440.000000 h:810.000000 type = kAXValueCGRectType})
com.google.Chrome.window.2692 AXPosition: Optional(<AXValue 0x600000548900> {value = x:600.000000 y:44.000000 type = kAXValueCGPointType})
com.google.Chrome.window.2692 AXGrowArea: nil
com.google.Chrome.window.2692 AXMinimizeButton: nil
com.google.Chrome.window.2692 AXDocument: nil
com.google.Chrome.window.2692 AXSections: [
com.google.Chrome.window.2692         Optional({
com.google.Chrome.window.2692             SectionDescription = Content;
com.google.Chrome.window.2692             SectionObject = "<AXUIElement 0x6000005492c0> {pid=35286}";
com.google.Chrome.window.2692             SectionUniqueID = AXContent;
com.google.Chrome.window.2692         }),
com.google.Chrome.window.2692         Optional({
com.google.Chrome.window.2692             SectionObject = "<AXUIElement 0x600000548f00> {pid=35286}";
com.google.Chrome.window.2692             SectionUniqueID = AXContainer;
com.google.Chrome.window.2692         })
com.google.Chrome.window.2692 ]
com.google.Chrome.window.2692 AXCloseButton: nil
com.google.Chrome.window.2692 AXMain: Optional(1)
com.google.Chrome.window.2692 AXActivationPoint: Optional(<AXValue 0x600000548900> {value = x:-1.000000 y:1170.000000 type = kAXValueCGPointType})
com.google.Chrome.window.2692 AXFullScreenButton: nil
com.google.Chrome.window.2692 AXProxy: nil
com.google.Chrome.window.2692 AXDefaultButton: nil
com.google.Chrome.window.2692 AXMinimized: Optional(0)
com.google.Chrome.window.2692 AXParent: Optional(<AXUIElement Application 0x60000054c690> {pid=35286})
com.google.Chrome.window.2692 AXTitleUIElement: nil
com.google.Chrome.window.2692 AXCancelButton: nil
com.google.Chrome.window.2692 AXModal: Optional(0)
com.google.Chrome.window.2692 AXZoomButton: nil
com.google.Chrome.window.2692 AXSize: Optional(<AXValue 0x60000057dad0> {value = w:1440.000000 h:810.000000 type = kAXValueCGSizeType})
com.google.Chrome.window.2692 AXToolbarButton: nil
com.google.Chrome.window.2692 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
com.google.Chrome             AXRole: Optional(AXApplication)
com.google.Chrome             AXTitle: Optional(Chrome)
com.google.Chrome             AXFunctionRowTopLevelElements: [
com.google.Chrome             ]
com.google.Chrome             AXFrame: nil
com.google.Chrome             AXFocusedUIElement: nil
com.google.Chrome             AXFrontmost: Optional(1)
com.google.Chrome             AXExtrasMenuBar: nil
com.google.Chrome             AXMainWindow: AXUIElement(windowId=2692, title="Picture-in-picture", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome             AXFocusedWindow: AXUIElement(windowId=2692, title="Picture-in-picture", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome             AXMenuBar: Optional(<AXUIElement 0x60000054c690> {pid=35286})
com.google.Chrome             AXWindows: [
com.google.Chrome                 AXUIElement(windowId=2692, title="Picture-in-picture", role="AXWindow", subrole="AXStandardWindow"),
com.google.Chrome                 AXUIElement(windowId=2681, title="Illuminati|Aavesham|Jithu Madhavan|Fahadh Faasil|Sushin Shyam,Dabzee,Vinayak| Nazriya|Anwar Rasheed - YouTube – Video playing in picture-in-picture mode - Google Chrome – Asnim", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome             ]
com.google.Chrome             AXSize: nil
com.google.Chrome             AXPosition: nil
com.google.Chrome             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

!!! DISCLAIMER !!!
!!! 'debug-windows' command is not stable API. Please don't rely on the command existence and output format !!!
!!! The only intended use case is to report bugs about incorrect windows handling !!!

Debug session finished

@asnimansari
Copy link
Author

I tried with Safari and Arc, those seems to be working fine.

@beanaroo
Copy link

beanaroo commented Jun 9, 2024

I can reproduce with Firefox as well

image

$ aerospace debug-windows

net.kovidgoyal.kitty.window.1120 windowId: 1120
net.kovidgoyal.kitty.window.1120 workspace: 2
net.kovidgoyal.kitty.window.1120 treeNodeParent: AppBundle.TilingContainer
net.kovidgoyal.kitty.window.1120 recognizedAsDialog: false
net.kovidgoyal.kitty.window.1120 AXTitle: Optional(aerospace debug-windows)
net.kovidgoyal.kitty.window.1120 AXRole: Optional(AXWindow)
net.kovidgoyal.kitty.window.1120 AXSubrole: Optional(AXStandardWindow)
net.kovidgoyal.kitty.window.1120 AXFocused: Optional(0)
net.kovidgoyal.kitty.window.1120 AXFullScreen: Optional(0)
net.kovidgoyal.kitty.window.1120 AXFrame: Optional(<AXValue 0x6000009bc700> {value = x:1030.000000 y:688.000000 w:1022.000000 h:636.000000 type = kAXValueCGRectType})
net.kovidgoyal.kitty.window.1120 AXPosition: Optional(<AXValue 0x60000121df20> {value = x:1030.000000 y:688.000000 type = kAXValueCGPointType})
net.kovidgoyal.kitty.window.1120 AXGrowArea: nil
net.kovidgoyal.kitty.window.1120 AXMinimizeButton: AXUIElement {
net.kovidgoyal.kitty.window.1120      AXRole: Optional(AXButton)
net.kovidgoyal.kitty.window.1120      AXTitle: nil
net.kovidgoyal.kitty.window.1120      AXSubrole: Optional(AXMinimizeButton)
net.kovidgoyal.kitty.window.1120      AXEnabled: Optional(1)
net.kovidgoyal.kitty.window.1120      AXParent: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXTopLevelUIElement: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
net.kovidgoyal.kitty.window.1120 }
net.kovidgoyal.kitty.window.1120 AXDocument: nil
net.kovidgoyal.kitty.window.1120 AXSections: [
net.kovidgoyal.kitty.window.1120         Optional({
net.kovidgoyal.kitty.window.1120             SectionDescription = Content;
net.kovidgoyal.kitty.window.1120             SectionObject = "<AXUIElement 0x60000121dfb0> {pid=13306}";
net.kovidgoyal.kitty.window.1120             SectionUniqueID = AXContent;
net.kovidgoyal.kitty.window.1120         })
net.kovidgoyal.kitty.window.1120 ]
net.kovidgoyal.kitty.window.1120 AXCloseButton: AXUIElement {
net.kovidgoyal.kitty.window.1120      AXRole: Optional(AXButton)
net.kovidgoyal.kitty.window.1120      AXTitle: nil
net.kovidgoyal.kitty.window.1120      AXSubrole: Optional(AXCloseButton)
net.kovidgoyal.kitty.window.1120      AXEnabled: Optional(1)
net.kovidgoyal.kitty.window.1120      AXParent: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXTopLevelUIElement: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
net.kovidgoyal.kitty.window.1120 }
net.kovidgoyal.kitty.window.1120 AXMain: Optional(1)
net.kovidgoyal.kitty.window.1120 AXActivationPoint: Optional(<AXValue 0x6000012019b0> {value = x:1100.000000 y:702.000000 type = kAXValueCGPointType})
net.kovidgoyal.kitty.window.1120 AXFullScreenButton: AXUIElement {
net.kovidgoyal.kitty.window.1120      AXRole: Optional(AXButton)
net.kovidgoyal.kitty.window.1120      AXTitle: nil
net.kovidgoyal.kitty.window.1120      AXSubrole: Optional(AXFullScreenButton)
net.kovidgoyal.kitty.window.1120      AXEnabled: Optional(1)
net.kovidgoyal.kitty.window.1120      AXParent: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXTopLevelUIElement: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
net.kovidgoyal.kitty.window.1120 }
net.kovidgoyal.kitty.window.1120 AXProxy: nil
net.kovidgoyal.kitty.window.1120 AXDefaultButton: nil
net.kovidgoyal.kitty.window.1120 AXMinimized: Optional(0)
net.kovidgoyal.kitty.window.1120 AXParent: Optional(<AXUIElement Application 0x60000121dd70> {pid=13306})
net.kovidgoyal.kitty.window.1120 AXTitleUIElement: AXUIElement(windowId=1120, title=nil, role="AXStaticText", subrole=nil)
net.kovidgoyal.kitty.window.1120 AXCancelButton: nil
net.kovidgoyal.kitty.window.1120 AXModal: Optional(0)
net.kovidgoyal.kitty.window.1120 AXZoomButton: AXUIElement {
net.kovidgoyal.kitty.window.1120      AXRole: Optional(AXButton)
net.kovidgoyal.kitty.window.1120      AXTitle: nil
net.kovidgoyal.kitty.window.1120      AXSubrole: Optional(AXFullScreenButton)
net.kovidgoyal.kitty.window.1120      AXEnabled: Optional(1)
net.kovidgoyal.kitty.window.1120      AXParent: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXTopLevelUIElement: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      AXWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty.window.1120      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
net.kovidgoyal.kitty.window.1120 }
net.kovidgoyal.kitty.window.1120 AXSize: Optional(<AXValue 0x6000012019b0> {value = w:1022.000000 h:636.000000 type = kAXValueCGSizeType})
net.kovidgoyal.kitty.window.1120 AXToolbarButton: nil
net.kovidgoyal.kitty.window.1120 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
net.kovidgoyal.kitty             AXRole: Optional(AXApplication)
net.kovidgoyal.kitty             AXTitle: Optional(kitty)
net.kovidgoyal.kitty             AXFunctionRowTopLevelElements: [
net.kovidgoyal.kitty             ]
net.kovidgoyal.kitty             AXFrame: nil
net.kovidgoyal.kitty             AXFocusedUIElement: AXUIElement(windowId=1120, title=nil, role="AXTextArea", subrole=nil)
net.kovidgoyal.kitty             AXFrontmost: Optional(1)
net.kovidgoyal.kitty             AXExtrasMenuBar: nil
net.kovidgoyal.kitty             AXMainWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty             AXFocusedWindow: AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty             AXMenuBar: Optional(<AXUIElement 0x6000012019b0> {pid=13306})
net.kovidgoyal.kitty             AXWindows: [
net.kovidgoyal.kitty                 AXUIElement(windowId=1120, title="aerospace debug-windows", role="AXWindow", subrole="AXStandardWindow")
net.kovidgoyal.kitty             ]
net.kovidgoyal.kitty             AXSize: nil
net.kovidgoyal.kitty             AXPosition: nil
net.kovidgoyal.kitty             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

org.mozilla.nightly.window.2501 windowId: 2501
org.mozilla.nightly.window.2501 workspace: 2
org.mozilla.nightly.window.2501 treeNodeParent: AppBundle.TilingContainer
org.mozilla.nightly.window.2501 recognizedAsDialog: false
org.mozilla.nightly.window.2501 AXTitle: Optional(Picture-in-Picture)
org.mozilla.nightly.window.2501 AXRole: Optional(AXWindow)
org.mozilla.nightly.window.2501 AXSubrole: Optional(AXStandardWindow)
org.mozilla.nightly.window.2501 AXFocused: Optional(1)
org.mozilla.nightly.window.2501 AXFullScreen: Optional(0)
org.mozilla.nightly.window.2501 AXFrame: Optional(<AXValue 0x600000994a00> {value = x:1030.000000 y:48.000000 w:1022.000000 h:576.000000 type = kAXValueCGRectType})
org.mozilla.nightly.window.2501 AXPosition: Optional(<AXValue 0x6000012464f0> {value = x:1030.000000 y:48.000000 type = kAXValueCGPointType})
org.mozilla.nightly.window.2501 AXGrowArea: nil
org.mozilla.nightly.window.2501 AXMinimizeButton: AXUIElement {
org.mozilla.nightly.window.2501      AXRole: Optional(AXButton)
org.mozilla.nightly.window.2501      AXTitle: nil
org.mozilla.nightly.window.2501      AXSubrole: Optional(AXMinimizeButton)
org.mozilla.nightly.window.2501      AXEnabled: Optional(0)
org.mozilla.nightly.window.2501      AXParent: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXTopLevelUIElement: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
org.mozilla.nightly.window.2501 }
org.mozilla.nightly.window.2501 AXDocument: nil
org.mozilla.nightly.window.2501 AXSections: [
org.mozilla.nightly.window.2501         Optional({
org.mozilla.nightly.window.2501             SectionDescription = Content;
org.mozilla.nightly.window.2501             SectionObject = "<AXUIElement 0x6000012a5ad0> {pid=12069}";
org.mozilla.nightly.window.2501             SectionUniqueID = AXContent;
org.mozilla.nightly.window.2501         })
org.mozilla.nightly.window.2501 ]
org.mozilla.nightly.window.2501 AXCloseButton: AXUIElement {
org.mozilla.nightly.window.2501      AXRole: Optional(AXButton)
org.mozilla.nightly.window.2501      AXTitle: nil
org.mozilla.nightly.window.2501      AXSubrole: Optional(AXCloseButton)
org.mozilla.nightly.window.2501      AXEnabled: Optional(1)
org.mozilla.nightly.window.2501      AXParent: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXTopLevelUIElement: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
org.mozilla.nightly.window.2501 }
org.mozilla.nightly.window.2501 AXMain: Optional(1)
org.mozilla.nightly.window.2501 AXActivationPoint: Optional(<AXValue 0x600001202940> {value = x:1040.000000 y:62.000000 type = kAXValueCGPointType})
org.mozilla.nightly.window.2501 AXFullScreenButton: AXUIElement {
org.mozilla.nightly.window.2501      AXRole: Optional(AXButton)
org.mozilla.nightly.window.2501      AXTitle: nil
org.mozilla.nightly.window.2501      AXSubrole: Optional(AXFullScreenButton)
org.mozilla.nightly.window.2501      AXEnabled: Optional(1)
org.mozilla.nightly.window.2501      AXParent: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXTopLevelUIElement: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
org.mozilla.nightly.window.2501 }
org.mozilla.nightly.window.2501 AXProxy: nil
org.mozilla.nightly.window.2501 AXDefaultButton: nil
org.mozilla.nightly.window.2501 AXMinimized: Optional(0)
org.mozilla.nightly.window.2501 AXParent: Optional(<AXUIElement Application 0x600001202940> {pid=12069})
org.mozilla.nightly.window.2501 AXTitleUIElement: nil
org.mozilla.nightly.window.2501 AXCancelButton: nil
org.mozilla.nightly.window.2501 AXModal: Optional(0)
org.mozilla.nightly.window.2501 AXZoomButton: AXUIElement {
org.mozilla.nightly.window.2501      AXRole: Optional(AXButton)
org.mozilla.nightly.window.2501      AXTitle: nil
org.mozilla.nightly.window.2501      AXSubrole: Optional(AXFullScreenButton)
org.mozilla.nightly.window.2501      AXEnabled: Optional(1)
org.mozilla.nightly.window.2501      AXParent: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXTopLevelUIElement: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      AXWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly.window.2501      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
org.mozilla.nightly.window.2501 }
org.mozilla.nightly.window.2501 AXSize: Optional(<AXValue 0x600001202940> {value = w:1022.000000 h:576.000000 type = kAXValueCGSizeType})
org.mozilla.nightly.window.2501 AXToolbarButton: nil
org.mozilla.nightly.window.2501 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
org.mozilla.nightly             AXRole: Optional(AXApplication)
org.mozilla.nightly             AXTitle: Optional(Firefox Nightly)
org.mozilla.nightly             AXFunctionRowTopLevelElements: [
org.mozilla.nightly             ]
org.mozilla.nightly             AXFrame: nil
org.mozilla.nightly             AXFocusedUIElement: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXGroup", subrole="AXUnknown")
org.mozilla.nightly             AXFrontmost: Optional(1)
org.mozilla.nightly             AXExtrasMenuBar: nil
org.mozilla.nightly             AXMainWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly             AXFocusedWindow: AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly             AXMenuBar: Optional(<AXUIElement 0x600001201980> {pid=12069})
org.mozilla.nightly             AXWindows: [
org.mozilla.nightly                 AXUIElement(windowId=2501, title="Picture-in-Picture", role="AXWindow", subrole="AXStandardWindow"),
org.mozilla.nightly                 AXUIElement(windowId=1694, title="AeroSpace Commands", role="AXWindow", subrole="AXStandardWindow")
org.mozilla.nightly             ]
org.mozilla.nightly             AXSize: nil
org.mozilla.nightly             AXPosition: nil
org.mozilla.nightly             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

!!! DISCLAIMER !!!
!!! 'debug-windows' command is not stable API. Please don't rely on the command existence and output format !!!
!!! The only intended use case is to report bugs about incorrect windows handling !!!

Debug session finished

@bcremer
Copy link
Sponsor

bcremer commented Jun 21, 2024

For firefox the following config works for me:

[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
if.window-title-regex-substring = 'Picture-in-Picture'
run = 'layout floating'

@exsesx
Copy link

exsesx commented Aug 12, 2024

For firefox the following config works for me:

[[on-window-detected]]
if.app-id = 'org.mozilla.firefox'
if.window-title-regex-substring = 'Picture-in-Picture'
run = 'layout floating'

This one works for Chrome:

[[on-window-detected]]
if.app-id = 'com.google.Chrome'
if.window-title-regex-substring = 'Picture in Picture'
run = 'layout floating'
check-further-callbacks = true

[[on-window-detected]]
if.app-id = 'com.google.Chrome'
run = "move-node-to-workspace W"

Make sure you're ordering those correctly – detecting Picture in Picture should come first, then move to the workspace rule.


This workaround tailored for a specific workspace (W in my case) allows me to keep my PiP window on top of other browser windows. However, most users might be more interested in achieving persistent PiP functionality, as discussed here: #2.

@exsesx
Copy link

exsesx commented Aug 15, 2024

Interesting observation: Arc browser floating PiP works out of the box and is always on top, no matter which workspace is selected.

They might've implemented PiP differently because aerospace list-windows doesn't show a separate window like it does for Firefox or Chrome.

@danfbfern
Copy link

@exsesx I noticed that on the Arc browser, the PiP only triggers if the PiP opens in the workspace that Arc is.
Meaning that if I have a video playing and change workspaces, PiP won't trigger and it won't show in other workspaces, but if I change tabs in Arc, it triggers PiP and it then shows on top of all workspaces.
So if I don't change tab to trigger the PiP, simply changing workspaces won't trigger the PiP.

Do you have the same behaviour ?

@exsesx
Copy link

exsesx commented Aug 21, 2024

@exsesx I noticed that on the Arc browser, the PiP only triggers if the PiP opens in the workspace that Arc is.

Meaning that if I have a video playing and change workspaces, PiP won't trigger and it won't show in other workspaces, but if I change tabs in Arc, it triggers PiP and it then shows on top of all workspaces.

So if I don't change tab to trigger the PiP, simply changing workspaces won't trigger the PiP.

Do you have the same behaviour ?

Yes, @danfbfern, and AFAIK, this is how PiP works in Arc. Simply changing focus doesn't trigger entering PiP.

@danfbfern
Copy link

danfbfern commented Aug 21, 2024

Yes, @danfbfern, and AFAIK, this is how PiP works in Arc. Simply changing focus doesn't trigger entering PiP.

@exsesx Okok, so it doesn't only happen to me
But when changing desktops or simply alt-tabbing to another app, Arc automatically changes to PiP even without changing tabs on the browser.
When using Yabai, this behavior stays the same because it uses the default Apple desktops, and Aerospace doesn't use it.

@nikitabobko is there a way to fake the same behavior to trick the Arc browser (or the OS itself) into thinking the desktop was changed?
It's probably the main behavior difference that I now miss after converting from Yabai to Aerospace.

@jakenvac
Copy link
Contributor

@danfbfern

s there a way to fake the same behavior to trick the Arc browser (or the OS itself) into thinking the desktop was changed?
It's probably the main behavior difference that I now miss after converting from Yabai to Aerospace.

This is a quirk that I've run into with MS Teams, too. Usually when in a meeting, if the window wasn't on the active desktop, it would show a mini floating window. Now that it's always technically on the active desktop it doesn't show. However minimizing teams also shows this window. It's an extra step but perhaps this will also work for Arc?

@danfbfern
Copy link

This is a quirk that I've run into with MS Teams, too. Usually when in a meeting, if the window wasn't on the active desktop, it would show a mini floating window. Now that it's always technically on the active desktop it doesn't show. However minimizing teams also shows this window. It's an extra step but perhaps this will also work for Arc?

Minimising actually does not trigger, but changing tabs in the browser (to trigger the PiP in the other tab) and then switching to the intended workspace is the workaround that works.

However I wonder if there is anything on the Aerospace side to mitigate this limitation, since its specifically related to the way it handles its own workspaces.

@jakenvac
Copy link
Contributor

jakenvac commented Sep 3, 2024

However I wonder if there is anything on the Aerospace side to mitigate this limitation, since its specifically related to the way it handles its own workspaces.

I doubt it, given that it's specific to Arc and when it chooses to show the PiP window. From the sounds of it Arc detects when it's not on the active mac os workspace. But with Aerospace, it's always on the active mac os workspace.

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

No branches or pull requests

7 participants