diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-27 16:51:17 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-27 16:51:17 +0400 |
| commit | dbcc1182ef924329d09ee3bc3a15afa08e0e682f (patch) | |
| tree | c5a4dc02b818122507025ce507e187743b14da84 | |
| parent | 1085ea99ff09986915c71cc158a7f29e36851334 (diff) | |
| download | niri-dbcc1182ef924329d09ee3bc3a15afa08e0e682f.tar.gz niri-dbcc1182ef924329d09ee3bc3a15afa08e0e682f.tar.bz2 niri-dbcc1182ef924329d09ee3bc3a15afa08e0e682f.zip | |
Update primary selection focus
| -rw-r--r-- | src/handlers/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index 87a0267d..7340e437 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -14,7 +14,9 @@ use smithay::wayland::data_device::{ ServerDndGrabHandler, }; use smithay::wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportError}; -use smithay::wayland::primary_selection::{PrimarySelectionHandler, PrimarySelectionState}; +use smithay::wayland::primary_selection::{ + set_primary_focus, PrimarySelectionHandler, PrimarySelectionState, +}; use smithay::{ delegate_data_device, delegate_dmabuf, delegate_output, delegate_pointer_gestures, delegate_presentation, delegate_primary_selection, delegate_seat, delegate_tablet_manager, @@ -39,7 +41,8 @@ impl SeatHandler for State { fn focus_changed(&mut self, seat: &Seat<Self>, focused: Option<&WlSurface>) { let dh = &self.niri.display_handle; let client = focused.and_then(|s| dh.get_client(s.id()).ok()); - set_data_device_focus(dh, seat, client); + set_data_device_focus(dh, seat, client.clone()); + set_primary_focus(dh, seat, client); } } delegate_seat!(State); |
