window_manager is now built on nativeapi: the per-platform plugin code is gone, and one C++ core drives macOS, Windows and Linux.
- Breaking:
package:window_manager/window_manager.dartexports the native API —Window,WindowManager,TitleBarStyle,ResizeEdge,VisualEffect, the window events withEventRequestfor answering a close request,DragToMoveArea,DragToResizeAreaandMaximizeButtonArea, and the conversions between nativeapi's geometry and colours and Flutter's — next to this package's ownWindowCaption,WindowCaptionButtonandVirtualWindowFrame. Several windows at once, content bounds, title bar colours, visual effects and focusability come with it. - The 0.5.x API moved to
package:window_manager/legacy.dart:windowManager,WindowListener,WindowOptions,DockSideandcalcWindowPosition. Existing apps change one import. It is a bridge: everything in it is@Deprecatedand will be removed in a later release. The README lists the behaviour differences and maps each old call to the native API. - Breaking: requires Flutter 3.47 / Dart 3.13 and macOS 10.15, and depends on nativeapi and nativeapi_flutter ^0.5.2. CI builds and the publish workflow pin Flutter 3.47.5.
- No setup of its own on any platform. The plugin classes, and with them the changes
MainFlutterWindow.swift,my_application.ccand the Windows runner used to need, are gone. - Closing works per window, as in 0.5.x: with
setPreventClose(true)the title bar's close button andclose()reportonWindowCloseand leave the window open, anddestroy()closes it anyway.WindowCaption's close button goes through the same close listeners, and its maximize button opens the snap layouts on Windows 11. onWindowClosealso reports ordinary close requests when prevent-close is off. Adestroy()vetoed by another native listener does not disable prevent-close for subsequent requests. Reattaching a legacy listener reads the current window state, so unmaximize and leaving full screen are reported correctly.WindowCaptionandVirtualWindowFramerefresh their state when their targetwindowchanges.- Events:
onWindowResized/onWindowMovedarrive together withonWindowResize/onWindowMove; the full-screen pair comes from the window's own full-screen events;onWindowDocked/onWindowUndockednever fire. The legacy events are those of the app's window alone, not of other windows it opens. package:window_manager/windowing.dartanswers theWindowbehind each of Flutter's multi-window controllers (nativeWindowOf(controller),controller.nativeWindow), so every window an app opens that way can be managed.popUpWindowMenu()opens the system menu at the cursor on Windows and Linux window managers that have one, andforward:ofsetIgnoreMouseEventskeeps hover events on macOS, Windows and X11.- Gone with the platform plugins, but still callable: aero-snap docking (
isDockable,isDocked,dock,undock) andgrabKeyboard/ungrabKeyboardanswer instead of throwing. So do the arguments nothing acts on any more —maximize(vertically:),animate:ofsetPositionandsetBounds,visibleOnFullScreen:ofsetVisibleOnAllWorkspaces. startDragging()andstartResizing()are no longer skipped on Windows while the window is in full screen: the compatibility layer keeps noPlatformbranch of its own, the core library decides.getId()answers nativeapi's window id,setAsFrameless()hides the title bar without removing the border, andsetAlignmenthandles anyAlignmentinstead of only the nine constants.screen_retrieverandpathare no longer dependencies.- New example on
package:flutter/widgets.dartalone; the full one is nativeapi's window_example.
- Upgrade
screen_retrieverto0.2.2for full Swift Package Manager support.
- fix: Fix PrivacyInfo.xcprivacy warning for macOS Desktop on Mac M1 macOS 15 (Sequoia) (#550)
- feat: Add
getIdmethod for retrieving window ID on macOS and Windows - feat: Add
getWindowHandlemethod (#548) - feat: Add Swift Package Manager support
- fix: Crash when using window_manager by multi engine on Windows platform (#546)
- fix: [Windows] Use frameless window to implement fullscreen (#531)
- fix: Initialize window_hints to fix minimum size setting in release mode (#510)
- [windows] fix: scale ratio on dpi change (#496)
- [windows] fix: get window monitor from minimized state (#495)
- [windows] Update window_manager_plugin.cpp for fix #439 issue #486
- [windows] fix: win, adjustNCCALCSIZE with monitor coords #482
- chore: Use custom paint icons to replace png icons (#467)
- chore: Remove the deprecated isBezeled property (#468)
- fix: windows, window size, fullscree & maximized (#477)
- fix(windows): fix TitleBar buttons does not display correctly #415
- fix(windows): crash after deconstruction #423
- fix(windows): WindowManager.IsFocused() method (#461)
- Updates minimum supported SDK version to Flutter 3.3/Dart 3.0.
- [windows] fix #396 fullscreen/unfullscreen events, disable minimize on fullscreen #409
- setAlignment support custom Alignment #424
- [windows] Wrong window position in fullscreen mode with external monitor #405
- [windows] fix: incorrect window size before/after setTitleBarStyle #401
- [windows] Fix #389 setAsFrameless on titleBarStyle.normal #400
- [macos] Fix incorrect centering when multi-screen
- [windows] feat: restore Windows 7 support (#388)
- [windows] Better fullscreen implementation (#367)
- [macos] fixes setMinimumSize and setMaximumSize (#341)
- [windows] Remove app cut at the bottom and force refresh when back from fullscreen (#359), Fixes #311, #266, #228, #355, #237
- [linux] fix: on-close event handler not be triggered on flutter >= 3.10 (#343)
- [linux] feat: Dock Window to Screen like Taskbar (#347)
- [macos] Fix blur and focus events when the MainFlutterWindow extends from NSPanel
- [macos] feat: setTitleBarStyle() restores window frame on Linux (#323)
- [macos] Implement
isVisibleOnAllWorkspaces&setVisibleOnAllWorkspacesmethods
- [macos] Feature to set labeled badge on taskbar aka dock (#305)
- [linux] remove the margins of the window frame (#318)
- Add AlwaysOnBottom support for Windows (#306)
- [Windows] make setMinimum/MaximumSize() dpi change awareable (#231)
- remove frameless on set title bar style on macos (#240)
- chore: Add windowButtonVisibility to WindowOptions
- [linux] avoid removing shadows if no title is set (#297)
- [macos] Implement isMaximizable and setMaximizable (#290)
- Don't crash if an event doesn't have a dedicated handler (#286)
- Remove all subWindow related implementations
- Add integration test (#275)
- [windows] add show and hide events (#274)
- [linux] clean up state tracking (#273)
- Add missing future return values (#272)
- [linux] implement minimizable & maximizable (#270)
- [linux] fix getTitle() crash when null (#269)
- [linux] fix on_window_show and on_window_hide signatures (#268)
- [windows] Fix set maximizable throwing an error (#267)
- [linux] clean up unused includes (#260)
- [linux] fix window geometry hints (#257)
- [linux] pass the plugin instance around as user data (#256)
- [linux] fix
getOpacity()(#255) - [Linux] use g_strcmp0() (#254)
- [Linux] remove misleading C++-style default values (#253)
- [Linux] implement
setBrightness()(#252) - [Linux] fix frameless window & background color (#250)
- [Linux] make
setTitleBarStyle()GTK/HDY/CSD/SSD compatible (#249)
- Bump screen_retriever from 0.1.2 to 0.1.4
- WindowOptions supports backgroundColor
- [linux] fix: offset lost after invoking gtk hide on linux #241
- [macos] Fix Unable to bridge NSNumber to Float #236
- [linux] Introduce grabKeyboard() and ungrabKeyboard() #229
- [linux] fix bottom edge resizing (#209)
- [linux] fix: cannot resize again after startResizing (#205)
- [windows] Added
verticallyparam to themaximizemethod. - [Linux] implementation of methods: setIcon, isFocused (#186)
- [macos] fix crash lead by fast clicks (#198)
- Remove decoration for maximized window (#191)
- [linux] fix: cannot drag again after startDragging (#203)
- [windows] Implement isMaximizable and setMaximizable (#200)
- [windows] Implement SetResizable for windows (#204)
- [linux] fix method response memory leaks (#159)
- [linux] Implement destroy #158
- [linux] Implement getOpacity & setOpacity #157
- [macos] Reimplement setBounds & getBounds method. #156
- Make WindowOptions constructor to const constructor. #147
- [windows] fix window overflow #131
- [macos] Add the animate parameter to setBounds method #142
- [linux] fix popUpWindowMenu() on Wayland #145
- Fixed cannot convert type Double to type CGFloat #138
- [linux & windows] Implement
popUpWindowMenumetnod #141
- Fixed overflow error after minimize #55, #119, #125
- Implement
isSkipTaskbarmethod #117 - [windows] Implement setIcon method #129
- The
waitUntilReadyToShowmethod adds options, callback parameters #111
- Compatible with lower versions of dart #98
- [macos & windows] Add
resized,movedevents. #28 - [linux] Implement
getTitleBarHeightmetnod #49 - [linux] Implement
getOpacitymetnod #44 - Add
TitleBarStyleenum #99 - [linux] Implement
setAlwaysOnBottommethod #100 - [windows] Removes crazy jittering when resizing window #103
- [windows] Fix overflow on fullscreen and maximize #105
- [windows] Implement
setHasShadowandhasShadowmethods #110 - [windows] Fix setAlignment(Alignment.bottomRight) display position is not correct #112 #113
- [linux] Implement
setTitleBarStylemethod - [linux] Implement
startResizingmethod - [windows] Implement
setProgressBarmethod #42 - [macos & windows] Implement
setIgnoreMouseEventsmetnod #89 - Update
DragToResizeAreawidget - Add
VirtualWindowFramewidget - Update
WindowCaptionwidget
- Fixed Visual bug in fullScreen #83
- Update
WindowCaptionwidget.
- Add
WindowCaptionwidget. #81 - [macos & windows] Implement
destroymethod
- Implement
setAspectRatiomethod #74 - [windows] Reimplement
getTitleBarHeightmethod #33 - [windows] Implement
startResizingmethod - [windows] Add
DragToResizeAreawidget - [windows] Fix maximize and minimize animation not working when there is title bar hidden
- Implement
isPreventClose&setPreventClosemethods #69 - Implement
closeevent - [macos & windows] Reimplement
closemethod - [windows] Fix Horizontal resizing not working on secondary display. #71
- [macos] Implement
isFocusedmethod - Implement
setAlignmentmethod #52
- Implement
closemethod #56 - Implement
centermethod #59
- [macos & windows] Implemented getOpacity & setOpacity methods #37 #45
- [macos] Implement setProgressBar method #40
- [windows] Fix
focus,blurevent not responding - [windows] Implement
focus&blurmethods - [macos & windows] Implement getTitleBarHeight methods #34
- [windows] #31 Optimize setTitleBarStyle method.
- [macos] Add setTitleBarStyle method.
- [windows] Add setTitleBarStyle method (Experiment).
- [windows] #24 Updated windows fullscreen handling.
- [windows] #26 Make
maximize,unmaximize,minimize,restoremethods have native animation effects.
- [macos] Fixed
setSizecoordinate error.
- Implemented
isResizable,setResizableMethods. - Implemented
isClosable,setClosableMethods. - Removed
terminateMethod. - [windows] Implemented
isMinimizable,setMinimizableMethods.
- Implemented
setAsFramelessMethod. - Implemented
setSkipTaskbarMethod. - Implemented
focus,blur,maximize,unmaximize,minimize,restore,resize,move,enter-full-screen,leave-full-screenEvents. - [macos] Implemented
hiddenWindowAtLaunchMethod. - Fixed #10
- Implemented
setCustomFrame,setBackgroundColorMethods.
- Implemented
isMinimized,minimize,restoreMethods. - Implemented
setMinimumSize,setMaximumSizeMethods. - [windows] #4 Do not set
HWND_TOPMOSTflag insetFullScreen
- Implemented
show,hide,isVisibleMethods. - Implemented
isMaximized,maximize,unmaximizeMethods. - Implemented
isFullScreen,setFullScreenMethods. - Implemented
getBounds,setBoundsMethods. - Implemented
getPosition,setPositionMethods. - Implemented
getSize,setSizeMethods. - Implemented
isAlwaysOnTop,setAlwaysOnTopMethods. - Implemented
terminateMethod.
- First release.