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

Google Meet PIP pop up not detected as a dialog #933

Closed
pm0u opened this issue Jan 7, 2025 · 5 comments
Closed

Google Meet PIP pop up not detected as a dialog #933

pm0u opened this issue Jan 7, 2025 · 5 comments
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers

Comments

@pm0u
Copy link

pm0u commented Jan 7, 2025

Per the docs, windows that don't have minimize/maximize should be detected as dialog. I believe based on the debug output, these windows lack this (I assume AXEnabled: Optional(0)?)

Debug output, username [REDACTED]

com.google.Chrome.window.92543 windowId: 92543
com.google.Chrome.window.92543 workspace: 1
com.google.Chrome.window.92543 treeNodeParent: AppBundle.TilingContainer
com.google.Chrome.window.92543 recognizedAsDialog: false
com.google.Chrome.window.92543 AXTitle: Optional(about:blank - [REDACTED])
com.google.Chrome.window.92543 AXRole: Optional(AXWindow)
com.google.Chrome.window.92543 AXSubrole: Optional(AXStandardWindow)
com.google.Chrome.window.92543 AXFocused: Optional(0)
com.google.Chrome.window.92543 AXFullScreen: Optional(0)
com.google.Chrome.window.92543 AXFrame: Optional(<AXValue 0x600003793840> {value = x:6.000000 y:46.000000 w:1382.000000 h:894.000000 type = kAXValueCGRectType})
com.google.Chrome.window.92543 AXPosition: Optional(<AXValue 0x600002cc5d40> {value = x:6.000000 y:46.000000 type = kAXValueCGPointType})
com.google.Chrome.window.92543 AXGrowArea: nil
com.google.Chrome.window.92543 AXMinimizeButton: AXUIElement {
com.google.Chrome.window.92543      AXRole: Optional(AXButton)
com.google.Chrome.window.92543      AXTitle: nil
com.google.Chrome.window.92543      AXSubrole: Optional(AXMinimizeButton)
com.google.Chrome.window.92543      AXEnabled: Optional(0)
com.google.Chrome.window.92543      AXParent: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXTopLevelUIElement: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXWindow: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
com.google.Chrome.window.92543 }
com.google.Chrome.window.92543 AXDocument: nil
com.google.Chrome.window.92543 AXSections: [
com.google.Chrome.window.92543         Optional({
com.google.Chrome.window.92543             SectionDescription = Content;
com.google.Chrome.window.92543             SectionObject = "<AXUIElement 0x600002cc4d20> {pid=780}";
com.google.Chrome.window.92543             SectionUniqueID = AXContent;
com.google.Chrome.window.92543         }),
com.google.Chrome.window.92543         Optional({
com.google.Chrome.window.92543             SectionObject = "<AXUIElement 0x600002cc42d0> {pid=780}";
com.google.Chrome.window.92543             SectionUniqueID = AXContainer;
com.google.Chrome.window.92543         })
com.google.Chrome.window.92543 ]
com.google.Chrome.window.92543 AXCloseButton: AXUIElement {
com.google.Chrome.window.92543      AXRole: Optional(AXButton)
com.google.Chrome.window.92543      AXTitle: nil
com.google.Chrome.window.92543      AXSubrole: Optional(AXCloseButton)
com.google.Chrome.window.92543      AXEnabled: Optional(0)
com.google.Chrome.window.92543      AXParent: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXTopLevelUIElement: AXUIElement(windowId=92543, title="about:blank - Paul (onX)", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXWindow: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
com.google.Chrome.window.92543 }
com.google.Chrome.window.92543 AXMain: Optional(1)
com.google.Chrome.window.92543 AXActivationPoint: Optional(<AXValue 0x600002c0e520> {value = x:-1.000000 y:1118.000000 type = kAXValueCGPointType})
com.google.Chrome.window.92543 AXFullScreenButton: nil
com.google.Chrome.window.92543 AXProxy: nil
com.google.Chrome.window.92543 AXDefaultButton: nil
com.google.Chrome.window.92543 AXMinimized: Optional(0)
com.google.Chrome.window.92543 AXParent: Optional(<AXUIElement Application 0x600002c0e520> {pid=780})
com.google.Chrome.window.92543 AXTitleUIElement: nil
com.google.Chrome.window.92543 AXCancelButton: nil
com.google.Chrome.window.92543 AXModal: Optional(0)
com.google.Chrome.window.92543 AXZoomButton: AXUIElement {
com.google.Chrome.window.92543      AXRole: Optional(AXButton)
com.google.Chrome.window.92543      AXTitle: nil
com.google.Chrome.window.92543      AXSubrole: Optional(AXZoomButton)
com.google.Chrome.window.92543      AXEnabled: Optional(0)
com.google.Chrome.window.92543      AXParent: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXTopLevelUIElement: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      AXWindow: AXUIElement(windowId=92543, title="about:blank - [REDACTED]", role="AXWindow", subrole="AXStandardWindow")
com.google.Chrome.window.92543      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.google.Chrome.window.92543 }
com.google.Chrome.window.92543 AXSize: Optional(<AXValue 0x600002cc4840> {value = w:1382.000000 h:894.000000 type = kAXValueCGSizeType})
com.google.Chrome.window.92543 AXToolbarButton: nil
com.google.Chrome.window.92543 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
@pm0u
Copy link
Author

pm0u commented Jan 7, 2025

For visual reference, this is the window in question. It shows up if you have an open meeting and navigate to a separate tab within the same window as the meeting.

image

@nikitabobko
Copy link
Owner

windows that don't have minimize/maximize should be detected as dialog

Google chrome is excluded from the heuristic because if you drag a tab into a separate window, the window doesn't have the fullscreen button for a few firsts seconds

If you find a way to distinguish dragged tab vs Google meet popup, I will happily accept your PR

The pointer in the source code: shouldFloat function

@pm0u
Copy link
Author

pm0u commented Jan 8, 2025

Unfortunately swift is a bit outside of my area of expertise. I think it could be targeted based on title as the title format is slightly different than a standard chrome tab, let me see if that works.

@pm0u
Copy link
Author

pm0u commented Jan 8, 2025

The following seems to work for me:

[[on-window-detected]]
if.app-id = 'com.google.Chrome'
if.window-title-regex-substring = '^about:blank - (?!Google Chrome).*$'
run = ['layout floating']

Standard chrome windows seem to be format {PAGE_TITLE} - Google Chrome - {PROFILE_NAME} while these seem to be format {PAGE_TITLE} - {PROFILE_NAME}, specifically page title is always about:blank so this regex excludes a standard tab / window that opens about:blank.

@nikitabobko nikitabobko added bug Something isn't working as expected triaged The issue makes sense to maintainers labels Jan 9, 2025
@nikitabobko
Copy link
Owner

Closing in favor of #1001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers
Projects
None yet
Development

No branches or pull requests

2 participants