Skip to content

Report changes in Window style (full screen, windowed, left side, right-top quarter etc) #17841

Description

@Qchristensen

Is your feature request related to a problem? Please describe.

You can press Windows+left arrow to make a window take up the left side of the screen, or windows+right arrow to make it take up the right side of the screen. Windows up arrow may make it take the top half of the screen, or go full screen (if windowed and not docked to an edge). Windows can also take up a quarter of the screen.

This can be difficult to predict, because some of these movements are based on the existing position of the window (if a window is "windowed" and not attached to any side, pressing windows+up arrow will make it go full screen. If the window is docked to the right side of the screen, it will make it take up the top-right quarter, and so on).

It would be useful if NVDA could report these changes. Sighted users in particular can find having windows full screen, or having two windows side by side (left and right docked, each taking up exactly half the screen) can be very useful. For blind NVDA users, it can be useful to know how much of the screen a window is taking up, especially when demonstrating or presenting to an audience.

Describe the solution you'd like

It would be useful to have NVDA report that a window is full screen, docked left, right, top, bottom, or top-left, bottom,right, or Windowed, etc.

This information could be presented both when changing the window size (eg with windows+left), and also potentially when opening or alt+tabbing to a Window.

Describe alternatives you've considered

This was raised in issue #4743, however the original issue was badly worded, and it was unsure at the time what the cost of implementation would be so it was closed as won't fix. After a question from a user, I felt it was worth revisiting.

Additional context

Tested with Windows 11 (64-bit) Version: 24H2, Build: 26100.3476 and NVDA 2024.4.2, but I don't believe anything has changed through Windows 11, 10 and even earlier. It MAY be that we need Microsoft to expose more information about the Window state, or it may be that the information is there and we just need to report it.

Activity

  1. SaschaCowley commented on Mar 19, 2025

    @SaschaCowley
    Member

    Worth noting that Narrator does this - for example, if I have settings open it will say things like "Settings snapped left half", "Settings snapped top left quarter", "Settings restored", "Settings maximized", or "Settings minimized", as I move the window with Windows+<arrowKey>. This is on Windows 11 24H2

  2. josephsl commented on Mar 19, 2025

    @josephsl
    Contributor

    Hi,

    When window size changes, a UIA notification event is sent which is handled by Narrator but not by NVDA as this element is not a native UIA element. If this is indeed the case, this is a variation on #16862, #16871 and #16888. Resolving this is going to be tricky (see a discussion on #16872) as UIA elements require a window handle that should be as native as possible.

    Thanks.

  3. hwf1324 commented on Mar 19, 2025

    @hwf1324
    Contributor

    A log of the relevant events is attached for reference:

    IO - inputCore.InputManager.executeGesture (06:59:16.629) - winInputHook (28152):
    Input: kb(laptop):windows+leftArrow
    DEBUG - UIAHandler.UIAHandler.IUIAutomationNotificationEventHandler_HandleNotificationEvent (06:59:16.651) - Dummy-2 (23380):
    handleNotificationEvent called with notificationKind ActionCompleted, notificationProcessing ImportantMostRecent, displayString 设置 贴靠在左半部分, activityID Windows.Shell.SnapComponent.SnapHotKeyResults, for element [None] [None] with automationID [None], className [None] and frameworkID [None]
    DEBUG - NVDAObjects.UIA.UIA.__init__ (06:59:16.651) - Dummy-2 (23380):
    No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
    DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:59:16.652) - Dummy-2 (23380):
    Locating nearest ancestor windowHandle for element [None] [None] with automationID [None], className [None] and frameworkID [None]
    DEBUGWARNING - UIAHandler.UIAHandler.getNearestWindowHandle (06:59:16.652) - Dummy-2 (23380):
    error walking up to an element with a valid windowHandle
    Traceback (most recent call last):
      File "UIAHandler\__init__.py", line 1343, in getNearestWindowHandle
        new = walker.NormalizeElementBuildCache(UIAElement, cacheRequest)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    _ctypes.COMError: (-2147467259, '未指定的错误', (None, None, None, 0, None))
    DEBUGWARNING - NVDAObjects.__call__ (06:59:16.653) - Dummy-2 (23380):
    Invalid NVDAObject: no windowHandle
    Traceback (most recent call last):
      File "NVDAObjects\__init__.py", line 105, in __call__
        obj.__init__(**kwargs)
      File "NVDAObjects\UIA\__init__.py", line 1549, in __init__
        raise InvalidNVDAObject("no windowHandle")
    NVDAObjects.InvalidNVDAObject: no windowHandle
    DEBUG - UIAHandler.UIAHandler.IUIAutomationNotificationEventHandler_HandleNotificationEvent (06:59:16.653) - Dummy-2 (23380):
    HandleNotificationEvent: Ignoring because no object: NotificationProcessing=1 displayString=设置 贴靠在左半部分 activityId=Windows.Shell.SnapComponent.SnapHotKeyResults
    
  4. added
    triagedHas been triaged, issue is waiting for implementation.
    p5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
    p4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
    and removed
    p5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
    on Mar 26, 2025
  5. josephsl commented on Jun 5, 2025

    @josephsl
    Contributor

    Hi,

    June 2025 update: this feature will require Windows 11 24H2 (2024 Update) or later as earlier releases do not raise anything when changing window size/state.

    Thanks.

  6. added this to the 2025.2 milestone on Jun 24, 2025
  7. added a commit that references this issue on Jun 24, 2025
    f6844c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked/needs-external-fixp4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions