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

[bug] WebviewWindow is not created at position on macOS #12167

Open
velocitysystems opened this issue Jan 3, 2025 · 1 comment
Open

[bug] WebviewWindow is not created at position on macOS #12167

velocitysystems opened this issue Jan 3, 2025 · 1 comment
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@velocitysystems
Copy link

Describe the bug

Creating a new WebviewWindow at specific x-y coordinates on a second display does not move to position.
Instead it is created on the primary display (at coordinates x = 0, y =0).

E.g. Assuming primary display is 3840 x 2160 (4k), we would expect the WebviewWindow to be draw fullscreen on the second display. This works correctly on Windows but not on macOS.

const window = new WebviewWindow('second-window', {
    title: 'Second Window',
    url: '/second-window',
    x: 3840,
    y: 0,
    fullscreen: true,
});

Reproduction

See above snippet.

Expected behavior

The WebviewWindow should be drawn fullscreen on the second display.

Full tauri info output

[✔] Environment
    - OS: Mac OS 15.2.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.12.0
    - pnpm: 9.15.2
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1 (outdated, latest: 2.2.0)
    - @tauri-apps/cli : 2.1.0 (outdated, latest: 2.2.1)

[-] Plugins
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : 2.2.0
    - tauri-plugin-http 🦀: 2.2.0
    - @tauri-apps/plugin-http : 2.2.0
    - tauri-plugin-upload 🦀: 2.2.1
    - @tauri-apps/plugin-upload : 2.2.1
    - tauri-plugin-os 🦀: 2.2.0
    - @tauri-apps/plugin-os : 2.0.0 (outdated, latest: 2.2.0)
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : 2.0.1 (outdated, latest: 2.2.0)
    - tauri-plugin-sql 🦀: 2.2.0
    - @tauri-apps/plugin-sql : 2.2.0

[-] App
    - build-type: bundle
    - CSP: default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost
    - frontendDist: ../dist
    - devUrl: http://localhost:5173/
    - framework: Vue.js
    - bundler: Rollup

Stack trace

No response

Additional context

#10420
#11170

@velocitysystems velocitysystems added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jan 3, 2025
@yokuze
Copy link

yokuze commented Jan 4, 2025

I’m having this issue also. I’d expect the new window to be positioned on the 2nd display, as it is in Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants