tauri
tauri copied to clipboard
[bug] Window changes position when AlwaysOnTop and AcceptFirstMouse window combined with Normal window
Describe the bug
Hello,
My app has two windows, one is alwaysOnTop and has acceptFirstMouse, the other is a normal window. The problem (see recording below) occurs when the normal window is clicked and then the on top window. When the op top window is clicked its window suddenly shifts position:
https://user-images.githubusercontent.com/26923796/227799984-5b74572e-8066-4ed0-8b27-043ec4a796f4.mov
In the recording I try to explain that the offset of the shifted window is exactly the mouse position + top left window offset.
This bug may be related to https://github.com/tauri-apps/tauri/issues/4056.
Reproduction
See recording. Below you find the window properties:
"windows": [
{
"label": "whiteboard",
"acceptFirstMouse": false,
"alwaysOnTop": false,
"decorations": false,
"fileDropEnabled": false,
"focus": false,
"fullscreen": false,
"maximized": true,
"transparent": true,
"resizable": false,
"visible": true,
"x": 0,
"y": 0,
"url": "https://localhost/whiteboard"
},
{
"label": "asteriks",
"acceptFirstMouse": true,
"alwaysOnTop": true,
"center": true,
"decorations": false,
"fileDropEnabled": false,
"focus": true,
"fullscreen": false,
"transparent": true,
"resizable": false,
"visible": false,
"height": 96,
"width": 96,
"url": "https://localhost/asteriks"
}
],
"macOSPrivateApi": true
Expected behavior
The always on top window should not shift in position.
Platform and versions
Environment
› OS: Mac OS 12.6.3 X64
› Node.js: 19.6.0
› npm: 9.4.0
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.25.2
› rustc: 1.68.1
› cargo: 1.68.1
› Rust toolchain: stable-aarch64-apple-darwin
Packages
› @tauri-apps/cli [NPM]: 1.2.3
› @tauri-apps/api [NPM]: 1.2.0
› tauri [RUST]: 1.2.3,
› tauri-build [RUST]: 2.0.0-alpha.2,
› tao [RUST]: 0.15.8,
› wry [RUST]: 0.23.4,
App
› build-type: bundle
› CSP: unset
› distDir: https://localhost/
› devPath: https://localhost/
App directory structure
├─ target
├─ node_modules
├─ icons
└─ src
Stack trace
-
Additional context
No response