Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42dcf64

Browse files
authored
fix: get window monitor from minimized state (#495)
Signed-off-by: fufesou <linlong1266@gmail.com>
1 parentdb6e067 commit42dcf64

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎windows/window_manager_plugin.cpp‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ class WindowManagerPlugin : public flutter::Plugin {
6666
LONG l =8;
6767
LONG t =8;
6868

69-
HMONITOR monitor =MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
69+
// HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
70+
// Don't use `MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST)` above.
71+
// Because if the window is restored from minimized state, the window is not in the correct monitor.
72+
// The monitor is always the left-most monitor.
73+
// https://github.com/leanflutter/window_manager/issues/489
74+
HMONITOR monitor =MonitorFromRect(&sz->rgrc[0], MONITOR_DEFAULTTONEAREST);
7075
if (monitor !=NULL) {
7176
MONITORINFO monitorInfo;
7277
monitorInfo.cbSize =sizeof(MONITORINFO);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp