Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Add dpiScale to WindowInfo object #1018

Open
wants to merge 1 commit into
base: source
Choose a base branch
from

Conversation

lmachens
Copy link
Contributor

@lmachens lmachens commented Nov 25, 2022

Calling overwolf.windows.getCurrentWindow returns dpiScale which is updated based on current scaling.

Example:

{
  "window": {
    "id": "Window_Extension_lbkdbgdijedpnmifplbkcjgbioaklmpghbehfmnp_desktop",
    "name": "desktop",
    "width": 400,
    "height": 660,
    "top": 200,
    "left": 3040,
    "isVisible": true,
    "logicalBounds": {
      "top": 200,
      "left": 3040,
      "width": 400,
      "height": 660
    },
    "state": "Normal",
    "dpiScale": 1,
    "stateEx": "normal",
    "monitorId": "\\\\.\\DISPLAY1",
    "type": "Desktop"
  },
  "status": "success",
  "success": true
}

Related to overwolf/types#62

@OdedItkinOW
Copy link
Collaborator

OdedItkinOW commented Dec 6, 2022

Will be merged in one of the upcoming small api-docs cleanups. Mainly because it needs a bit of editing (It's mostly just that the dpi scale only actually changes if the window is defined as native. You can see this by comparing its behavior between the settings app's main window (non-native), and the overwolf app store's main window (native))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants