From efc8595b25b04d1c4ed88c41ad8defa818d0cac6 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:51:11 -0500 Subject: [PATCH] docs: add Wayland note to `win.getPosition()` and `win.getBounds()` (#49659) docs: add Wayland note to win.getPosition() Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- docs/api/base-window.md | 6 ++++++ docs/api/browser-window.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/api/base-window.md b/docs/api/base-window.md index 43aa8a156b..bfc39dece9 100644 --- a/docs/api/base-window.md +++ b/docs/api/base-window.md @@ -756,6 +756,9 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as ` > [!NOTE] > On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`. +> [!NOTE] +> On Wayland, this method will return `{ x: 0, y: 0, ... }` as introspecting or programmatically changing the global window coordinates is prohibited. + #### `win.getBackgroundColor()` Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format. @@ -969,6 +972,9 @@ Moves window to `x` and `y`. Returns `Integer[]` - Contains the window's current position. +> [!NOTE] +> On Wayland, this method will return `[0, 0]` as introspecting or programmatically changing the global window coordinates is prohibited. + #### `win.setTitle(title)` * `title` string diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index f04267bc61..99a00ce040 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -862,6 +862,9 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as ` > [!NOTE] > On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`. +> [!NOTE] +> On Wayland, this method will return `{ x: 0, y: 0, ... }` as introspecting or programmatically changing the global window coordinates is prohibited. + #### `win.getBackgroundColor()` Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format. @@ -1087,6 +1090,9 @@ Not supported on Wayland (Linux). Returns `Integer[]` - Contains the window's current position. +> [!NOTE] +> On Wayland, this method will return `[0, 0]` as introspecting or programmatically changing the global window coordinates is prohibited. + #### `win.setTitle(title)` * `title` string