-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: system menu #141
Comments
I tried adding this functionality for the windows platform, but it doesn't seem to display the state of the menu items correctly |
Strange, the docs claim that it should be automatically taken care of. Which state is wrong?
|
I've added a popUpWindowMenu method for windows and linux platforms, but I can't fix this incorrect state on Windows for now. |
Awesome, thanks! I gave it a very quick try with minimal test app: import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('window_manager')),
body: GestureDetector(
onSecondaryTapDown: (details) {
// print(details.globalPosition);
windowManager.popUpWindowMenu();
},
),
),
),
);
} On Ubuntu 22.04 + Wayland, the menu appears but some assertions fail:
|
I'm not very familiar with linux, do you know what causes these to appear? |
Interesting, the warnings were actually from the X11 backend because VS Code sets GDK_BACKEND=x11. The Wayland backend would crash due to missing device, but both are fixed by #145. |
Could there be API to show the window system menu on Linux and Windows?
The text was updated successfully, but these errors were encountered: