aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-03-08 17:08:58 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-03-08 17:08:58 +0400
commit03fe864d07d0ede40d87231286b67c70aeb37f9f (patch)
treefff61fe8b19cf4f23b99039f73c31c97b36f2bb7 /src/handlers
parente45dbb8ef67618bfbdb318eccb39fe06ad20dd00 (diff)
downloadniri-03fe864d07d0ede40d87231286b67c70aeb37f9f.tar.gz
niri-03fe864d07d0ede40d87231286b67c70aeb37f9f.tar.bz2
niri-03fe864d07d0ede40d87231286b67c70aeb37f9f.zip
Add xdg-foreign
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/xdg_shell.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index 78b38be3..7302c2ac 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -22,7 +22,10 @@ use smithay::wayland::shell::xdg::{
PopupSurface, PositionerState, ToplevelSurface, XdgPopupSurfaceData, XdgShellHandler,
XdgShellState, XdgToplevelSurfaceData, XdgToplevelSurfaceRoleAttributes,
};
-use smithay::{delegate_kde_decoration, delegate_xdg_decoration, delegate_xdg_shell};
+use smithay::wayland::xdg_foreign::{XdgForeignHandler, XdgForeignState};
+use smithay::{
+ delegate_kde_decoration, delegate_xdg_decoration, delegate_xdg_foreign, delegate_xdg_shell,
+};
use crate::layout::workspace::ColumnWidth;
use crate::niri::{PopupGrabState, State};
@@ -526,9 +529,15 @@ impl KdeDecorationHandler for State {
&self.niri.kde_decoration_state
}
}
-
delegate_kde_decoration!(State);
+impl XdgForeignHandler for State {
+ fn xdg_foreign_state(&mut self) -> &mut XdgForeignState {
+ &mut self.niri.xdg_foreign_state
+ }
+}
+delegate_xdg_foreign!(State);
+
fn initial_configure_sent(toplevel: &ToplevelSurface) -> bool {
with_states(toplevel.wl_surface(), |states| {
states