From 3cb587945a753d3c50458c59811cabdff7212e2d Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Mon, 15 Jan 2024 22:10:28 -0800 Subject: [PATCH] fix: use `gtk_layer_set_keyboard_mode()` `gtk_layer_set_keyboard_interactivity()` is deprecated and was removed in gtk4-layer-shell. Note that this bumps version requirement to 0.6.0 --- meson.build | 2 +- src/bar.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 648de3fd..ddb757f6 100644 --- a/meson.build +++ b/meson.build @@ -120,7 +120,7 @@ if libsndio.found() endif endif -gtk_layer_shell = dependency('gtk-layer-shell-0', version: ['>=0.5.0'], +gtk_layer_shell = dependency('gtk-layer-shell-0', version: ['>=0.6.0'], default_options: ['introspection=false', 'vapi=false'], fallback: ['gtk-layer-shell', 'gtk_layer_shell']) systemd = dependency('systemd', required: get_option('systemd')) diff --git a/src/bar.cpp b/src/bar.cpp index cfe723a3..e919ded2 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -131,7 +131,7 @@ struct GLSSurfaceImpl : public BarSurface, public sigc::trackable { output_name_ = output.name; // this has to be executed before GtkWindow.realize gtk_layer_init_for_window(window_.gobj()); - gtk_layer_set_keyboard_interactivity(window.gobj(), FALSE); + gtk_layer_set_keyboard_mode(window.gobj(), GTK_LAYER_SHELL_KEYBOARD_MODE_NONE); gtk_layer_set_monitor(window_.gobj(), output.monitor->gobj()); gtk_layer_set_namespace(window_.gobj(), "waybar");