-
-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Description
Bug Description
The setClosable(false)
method does not work on Linux platforms. When called, it has no effect and users can still close the window using the window manager's close button.
Environment
- Operating System: Linux (Ubuntu 22.04)
- Flutter Version: 3.29.3
- window_manager Version: ^0.5.1
Steps to Reproduce
- Create a Flutter desktop app for Linux
- Add window_manager dependency
- Call
await windowManager.setClosable(false)
in your initialization code - Run the app on Linux
- Try to close the window using the X button in the title bar
Expected Behavior
The window should not be closable when setClosable(false)
is called. The close button should be disabled or the close action should be prevented.
Actual Behavior
The window remains closable despite calling setClosable(false)
. The close button remains active and functional (works on Windows)
Code Sample
import 'package:window_manager/window_manager.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();
WindowOptions windowOptions = WindowOptions(
size: Size(800, 600),
center: true,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
await windowManager.setClosable(false); // This doesn't work on Linux
});
runApp(MyApp());
}
Metadata
Metadata
Assignees
Labels
No labels