aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-30 09:20:49 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-30 12:30:57 +0400
commitd3f4583c903dc36d93924ce3d2ec8c9ffc57dae5 (patch)
tree8f4142cc3d61c2b605dba70070ce9c3a1a72d8c7 /src/handlers
parentfefb1cccd6c3c7b92f8d4021fe5e38609760d1e4 (diff)
downloadniri-d3f4583c903dc36d93924ce3d2ec8c9ffc57dae5.tar.gz
niri-d3f4583c903dc36d93924ce3d2ec8c9ffc57dae5.tar.bz2
niri-d3f4583c903dc36d93924ce3d2ec8c9ffc57dae5.zip
foreign_toplevel: Use OutputHandler to send output_enter on demand
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index f0620a5b..0ca5e7bb 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -23,6 +23,7 @@ use smithay::utils::{Logical, Rectangle, Size};
use smithay::wayland::compositor::{send_surface_state, with_states};
use smithay::wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportNotifier};
use smithay::wayland::input_method::{InputMethodHandler, PopupSurface};
+use smithay::wayland::output::OutputHandler;
use smithay::wayland::pointer_constraints::PointerConstraintsHandler;
use smithay::wayland::security_context::{
SecurityContext, SecurityContextHandler, SecurityContextListenerSource,
@@ -49,7 +50,9 @@ use smithay::{
use crate::delegate_foreign_toplevel;
use crate::niri::{ClientState, State};
-use crate::protocols::foreign_toplevel::{ForeignToplevelHandler, ForeignToplevelManagerState};
+use crate::protocols::foreign_toplevel::{
+ self, ForeignToplevelHandler, ForeignToplevelManagerState,
+};
use crate::utils::output_size;
impl SeatHandler for State {
@@ -206,6 +209,11 @@ impl DataControlHandler for State {
delegate_data_control!(State);
+impl OutputHandler for State {
+ fn output_bound(&mut self, output: Output, wl_output: WlOutput) {
+ foreign_toplevel::on_output_bound(self, &output, &wl_output);
+ }
+}
delegate_output!(State);
delegate_presentation!(State);