switch to new window_manager from main
This commit is contained in:
parent
479279b68e
commit
44a1ec667e
6 changed files with 102 additions and 97 deletions
|
|
@ -12,9 +12,7 @@
|
|||
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
||||
#include <media_kit_video/media_kit_video_plugin.h>
|
||||
#include <pasteboard/pasteboard_plugin.h>
|
||||
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
#include <window_manager/window_manager_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) app_links_linux_registrar =
|
||||
|
|
@ -35,13 +33,7 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||
g_autoptr(FlPluginRegistrar) pasteboard_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin");
|
||||
pasteboard_plugin_register_with_registrar(pasteboard_registrar);
|
||||
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
|
||||
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) window_manager_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
|
||||
window_manager_plugin_register_with_registrar(window_manager_registrar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
media_kit_libs_linux
|
||||
media_kit_video
|
||||
pasteboard
|
||||
screen_retriever_linux
|
||||
url_launcher_linux
|
||||
window_manager
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
|
|||
|
|
@ -36,7 +36,13 @@ pkgs.mkShell {
|
|||
})
|
||||
android.platform-tools
|
||||
]
|
||||
++ lib.optional pkgs.stdenv.isLinux wayland;
|
||||
++ lib.optionals pkgs.stdenv.isLinux [
|
||||
wayland
|
||||
# nativeapi includes XInput2.h, which needs these, but xi.pc only lists them privately
|
||||
libxext
|
||||
libxfixes
|
||||
(callPackage ./pkg/hook_pkg_config.nix { })
|
||||
];
|
||||
|
||||
env = rec {
|
||||
LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.libclang ];
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
callPackage,
|
||||
mpv-unwrapped,
|
||||
libass,
|
||||
libxext,
|
||||
libxfixes,
|
||||
libclang,
|
||||
flutter,
|
||||
stdenv,
|
||||
|
|
@ -25,9 +27,14 @@ flutter.buildFlutterApplication {
|
|||
"--dart-define=GIT_COMMIT=${commit}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ (callPackage ./hook_pkg_config.nix { }) ];
|
||||
|
||||
buildInputs = [
|
||||
mpv-unwrapped
|
||||
libass
|
||||
# nativeapi includes XInput2.h, which needs these, but xi.pc only lists them privately
|
||||
libxext
|
||||
libxfixes
|
||||
];
|
||||
|
||||
env.LIBCLANG_PATH = lib.makeLibraryPath [ libclang ];
|
||||
|
|
@ -42,9 +49,10 @@ flutter.buildFlutterApplication {
|
|||
m3e_design = "sha256-5V9m6yY0jimx2gh7lQHYg4HDKQ4Wrl0ATmBhw5DkQMI=";
|
||||
native_toolchain_cmake = "sha256-/drnHZebmTnsCnHgC1xmlAe+U4PSrjw5Sm9axicuTrY=";
|
||||
navigation_rail_m3e = "sha256-5V9m6yY0jimx2gh7lQHYg4HDKQ4Wrl0ATmBhw5DkQMI=";
|
||||
unifiedpush_linux = "sha256-aIF/8oabSuuZo7K6qr4r7UBmf57qgoGAXyJ40fdntuQ=";
|
||||
unifiedpush_platform_interface = "sha256-aIF/8oabSuuZo7K6qr4r7UBmf57qgoGAXyJ40fdntuQ=";
|
||||
unifiedpush_linux = "sha256-KQKyBPL2ORK9O89C4K3RHGve/lvFaU1vIjSDnj6+bj4=";
|
||||
unifiedpush_platform_interface = "sha256-KQKyBPL2ORK9O89C4K3RHGve/lvFaU1vIjSDnj6+bj4=";
|
||||
webcrypto = "sha256-HW0NukbddwOYd9iVUFA3L8iy1qggnyOBgcbMj0MTYss=";
|
||||
window_manager = "sha256-xUd5hG+/V6F+m0ZUL/3XGPACFG/zqI5JM6IaMVvLgx4=";
|
||||
xdg_desktop_portal = "sha256-8GgiXHGv+wy6hJgj/rZxbymMitNVmdDLAnedZm9STSc=";
|
||||
};
|
||||
|
||||
|
|
|
|||
32
linux/nix/pkg/hook_pkg_config.nix
Normal file
32
linux/nix/pkg/hook_pkg_config.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
stdenvNoCC,
|
||||
pkg-config,
|
||||
pkg-config-unwrapped,
|
||||
makeWrapper,
|
||||
gtk3,
|
||||
libx11,
|
||||
libxi,
|
||||
}:
|
||||
|
||||
# Build hooks run with a filtered environment that drops PKG_CONFIG_PATH, so
|
||||
# nativeapi's hook can only find its libraries through a pkg-config on PATH.
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "hook-pkg-config";
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
libx11
|
||||
libxi
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
makeWrapper ${pkg-config-unwrapped}/bin/pkg-config $out/bin/pkg-config \
|
||||
--prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH"
|
||||
'';
|
||||
}
|
||||
|
|
@ -155,11 +155,6 @@ static void my_application_activate(
|
|||
}
|
||||
#endif
|
||||
|
||||
gtk_widget_set_size_request(
|
||||
GTK_WIDGET(window),
|
||||
250,
|
||||
-1);
|
||||
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar =
|
||||
GTK_HEADER_BAR(
|
||||
|
|
|
|||
Loading…
Reference in a new issue