aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-14 08:35:49 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-14 09:03:20 +0300
commit0d3610416cb030e81251c4accf84353acf2059f0 (patch)
tree368f1509ccd13d1c1b990b5ead4768730fa8d176 /src
parent377ad540165415b4141621b6b38f2da6fdecb24c (diff)
downloadniri-0d3610416cb030e81251c4accf84353acf2059f0.tar.gz
niri-0d3610416cb030e81251c4accf84353acf2059f0.tar.bz2
niri-0d3610416cb030e81251c4accf84353acf2059f0.zip
Update Smithay (idle-notify 2)
Diffstat (limited to 'src')
-rw-r--r--src/handlers/mod.rs10
-rw-r--r--src/niri.rs8
-rw-r--r--src/render_helpers/shader_element.rs4
-rw-r--r--src/ui/screenshot_ui.rs2
-rw-r--r--src/window/mapped.rs2
5 files changed, 14 insertions, 12 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 4734b2ba..98cb87ea 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -50,7 +50,9 @@ use smithay::wayland::selection::data_device::{
use smithay::wayland::selection::primary_selection::{
set_primary_focus, PrimarySelectionHandler, PrimarySelectionState,
};
-use smithay::wayland::selection::wlr_data_control::{DataControlHandler, DataControlState};
+use smithay::wayland::selection::wlr_data_control::{
+ DataControlHandler as WlrDataControlHandler, DataControlState as WlrDataControlState,
+};
use smithay::wayland::selection::{SelectionHandler, SelectionTarget};
use smithay::wayland::session_lock::{
LockSurface, SessionLockHandler, SessionLockManagerState, SessionLocker,
@@ -386,9 +388,9 @@ impl PrimarySelectionHandler for State {
}
delegate_primary_selection!(State);
-impl DataControlHandler for State {
- fn data_control_state(&self) -> &DataControlState {
- &self.niri.data_control_state
+impl WlrDataControlHandler for State {
+ fn data_control_state(&self) -> &WlrDataControlState {
+ &self.niri.wlr_data_control_state
}
}
diff --git a/src/niri.rs b/src/niri.rs
index 6dc38bc3..a1a400de 100644
--- a/src/niri.rs
+++ b/src/niri.rs
@@ -89,7 +89,7 @@ use smithay::wayland::relative_pointer::RelativePointerManagerState;
use smithay::wayland::security_context::SecurityContextState;
use smithay::wayland::selection::data_device::{set_data_device_selection, DataDeviceState};
use smithay::wayland::selection::primary_selection::PrimarySelectionState;
-use smithay::wayland::selection::wlr_data_control::DataControlState;
+use smithay::wayland::selection::wlr_data_control::DataControlState as WlrDataControlState;
use smithay::wayland::session_lock::{LockSurface, SessionLockManagerState, SessionLocker};
use smithay::wayland::shell::kde::decoration::KdeDecorationState;
use smithay::wayland::shell::wlr_layer::{self, Layer, WlrLayerShellState};
@@ -271,7 +271,7 @@ pub struct Niri {
pub idle_inhibit_manager_state: IdleInhibitManagerState,
pub data_device_state: DataDeviceState,
pub primary_selection_state: PrimarySelectionState,
- pub data_control_state: DataControlState,
+ pub wlr_data_control_state: WlrDataControlState,
pub popups: PopupManager,
pub popup_grab: Option<PopupGrabState>,
pub presentation_state: PresentationState,
@@ -1882,7 +1882,7 @@ impl Niri {
.unwrap()
.primary_selection_disabled
});
- let data_control_state = DataControlState::new::<State, _>(
+ let wlr_data_control_state = WlrDataControlState::new::<State, _>(
&display_handle,
Some(&primary_selection_state),
client_is_unrestricted,
@@ -2100,7 +2100,7 @@ impl Niri {
idle_inhibit_manager_state,
data_device_state,
primary_selection_state,
- data_control_state,
+ wlr_data_control_state,
popups: PopupManager::default(),
popup_grab: None,
suppressed_keys: HashSet::new(),
diff --git a/src/render_helpers/shader_element.rs b/src/render_helpers/shader_element.rs
index be3ccec6..09cd721e 100644
--- a/src/render_helpers/shader_element.rs
+++ b/src/render_helpers/shader_element.rs
@@ -310,7 +310,7 @@ impl RenderElement<GlesRenderer> for ShaderRenderElement {
let rect_constrained_loc = rect
.loc
- .constrain(Rectangle::from_extemities((0, 0), dest_size.to_point()));
+ .constrain(Rectangle::from_extremities((0, 0), dest_size.to_point()));
let rect_clamped_size = rect.size.clamp(
(0, 0),
(dest_size.to_point() - rect_constrained_loc).to_size(),
@@ -330,7 +330,7 @@ impl RenderElement<GlesRenderer> for ShaderRenderElement {
let rect_constrained_loc = rect
.loc
- .constrain(Rectangle::from_extemities((0, 0), dest_size.to_point()));
+ .constrain(Rectangle::from_extremities((0, 0), dest_size.to_point()));
let rect_clamped_size = rect.size.clamp(
(0, 0),
(dest_size.to_point() - rect_constrained_loc).to_size(),
diff --git a/src/ui/screenshot_ui.rs b/src/ui/screenshot_ui.rs
index 58298de9..aa6c38b8 100644
--- a/src/ui/screenshot_ui.rs
+++ b/src/ui/screenshot_ui.rs
@@ -657,7 +657,7 @@ pub fn rect_from_corner_points(
let y2 = max(a.y, b.y);
// We're adding + 1 because the pointer is clamped to output size - 1, so to get the full
// screen worth of selection we must add back that + 1.
- Rectangle::from_extemities((x1, y1), (x2 + 1, y2 + 1))
+ Rectangle::from_extremities((x1, y1), (x2 + 1, y2 + 1))
}
fn render_panel(
diff --git a/src/window/mapped.rs b/src/window/mapped.rs
index 055f2cc5..37465843 100644
--- a/src/window/mapped.rs
+++ b/src/window/mapped.rs
@@ -466,7 +466,7 @@ impl Mapped {
impl Drop for Mapped {
fn drop(&mut self) {
- remove_pre_commit_hook(self.toplevel().wl_surface(), self.pre_commit_hook);
+ remove_pre_commit_hook(self.toplevel().wl_surface(), self.pre_commit_hook.clone());
}
}