Skip to content

Commit 50ddf5e

Browse files
committed
fix: avoid _titlebarHeight to be set as negative value when drag resizing window
1 parent 2ddd420 commit 50ddf5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/widgets/titlebar_safe_area.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class _MacOSTitlebarSafeAreaState extends State<_MacOSTitlebarSafeArea> {
1919
/// Updates the height of the titlebar, if necessary.
2020
Future<void> _updateTitlebarHeight() async {
2121
final newTitlebarHeight = await WindowManipulator.getTitlebarHeight();
22-
if (_titlebarHeight != newTitlebarHeight) {
22+
if (_titlebarHeight != newTitlebarHeight && newTitlebarHeight >= 0) {
2323
setState(() {
2424
_titlebarHeight = newTitlebarHeight;
2525
});

0 commit comments

Comments
 (0)