Skip to content

Make getActiveWindow() work for context menus on Windows #558

Open
@joel-duffie

Description

@joel-duffie

Short overview
Add functionality to get the region of contextual menus and other UI elements on MS Windows.

Use case
I'm using nut.js in an application where I need to work with right-click/menubar menus in my application.

Detailed description
I've used getActiveWindow() to great extent to capture these menus on MacOS. However, Windows does not treat these menus in the same way; on Windows, getActiveWindow() returns the open app's entire window, not just the open context menu.

This is a known behavior on Windows, in that it treats the 'active window' differently than MacOS does.
So, I propose that there be another function, or an amendment to the current getActiveWindow() function, to make Windows work the same as Mac does.

Understandably, this may be impossible to achieve, but I wanted to suggest it, as it would be extremely helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions