flutter_window_close icon indicating copy to clipboard operation
flutter_window_close copied to clipboard

[windows] Use existing window proc delegation & HWND retrieval APIs from Flutter

Open alexmercerind opened this issue 3 years ago • 0 comments

  • feat: expose FlutterWindowClose.destroyWindow for customized usage.
  • fix: use flutter::PluginRegistrarWindows::RegisterTopLevelWindowProcDelegate for proc delegation & improve HWND retrieval.
    • Refactored Windows implementation use make use of flutter::PluginRegistrarWindows::RegisterTopLevelWindowProcDelegate instead of changing GWLP_WNDPROC. This gives other plugins opportunity to delegate/listen to window messages as-well.
    • Replaced GetActiveWindow with public API present in Flutter already. GetActiveWindow can result in unpredicted behaviors.
    • Improved code structure & followed Google Style Guide for C++.

https://github.com/zonble/flutter_window_close/blob/79e358db9e1edaa9dc147a7e31d73b0b3ba02cdb/windows/flutter_window_close_plugin.cpp#L73-L75

alexmercerind avatar Oct 03 '22 04:10 alexmercerind