Skip to content

new window doesn't update UI when lose focus [desktop_multi_window] #289

@GianSt3

Description

@GianSt3

I copy-paste the example app that's in pub dev page and had this problem.

Reproduce Steps

Steps to reproduce the behavior:

  1. Copy paste the example app in lib/main.dart
  2. Add the 2 libraries:
  • desktop_multi_window: ^0.2.0
  • desktop_lifecycle: ^0.1.1
  1. copy paste the EventWidget in lib folder.
  2. run the app in MACOS
  3. Open new window from the main window
  4. Send some events - child windows gets updated
  5. change focus (cmd + tab) - come back to Android Studio or another app.
  6. Focus again on the multi_window app
  7. Send some events from main window
  8. Child windows doesn't update anymore - it updates during the manual resize of the window. It seems blocked.

Expected behavior

child window updates as before.

Version (please complete the following information):
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.4, on macOS 13.5.1 22G90 darwin-x64, locale it-IT)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.82.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Additional log

Launching lib/main.dart on macOS in debug mode...
Building macOS application...
2023-09-21 18:03:57.529 xcodebuild[64059:635401]  DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-21506/DTDeviceKitBase/DTDKRemoteDeviceData.m:382
Details:  (null) deviceType from 00008101-001939E22061401E was NULL when -platform called.
Object:   <DTDKMobileDeviceToken: 0x7f97c098cbe0>
Method:   -platform
Thread:   <NSThread: 0x600003259b00>{number = 8, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2023-09-21 18:03:57.712 xcodebuild[64059:635399]  DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-21506/DTDeviceKitBase/DTDKRemoteDeviceData.m:382
Details:  (null) deviceType from 00008101-001939E22061401E was NULL when -platform called.
Object:   <DTDKMobileDeviceToken: 0x7f97c098cbe0>
Method:   -platform
Thread:   <NSThread: 0x60000322c080>{number = 4, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2023-09-21 18:03:57.876 xcodebuild[64059:635399]  DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-21506/DTDeviceKitBase/DTDKRemoteDeviceData.m:382
Details:  (null) deviceType from 00008101-001939E22061401E was NULL when -platform called.
Object:   <DTDKMobileDeviceToken: 0x7f97c098cbe0>
Method:   -platform
Thread:   <NSThread: 0x60000322c080>{number = 4, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
Debug service listening on ws://127.0.0.1:58661/4ypa0ybYEZY=/ws
Syncing files to device macOS...

When i open the first window

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method init on channel desktop_lifecycle)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)
<asynchronous suspension>

When the child window doesn't update anymore

"release window resource"
embedder.cc (2509): 'FlutterEngineSendPlatformMessage' returned 'kInvalidArguments'. Invalid engine handle.
2023-09-21 18:15:35.802 test_multi_desktop[66710:654426] Failed to send message to Flutter engine on channel 'flutter/lifecycle' (2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions