aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-09-30 15:24:50 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-09-30 15:24:50 +0300
commit94e5408f46dd1635004748f34ad38ae9f2bc945d (patch)
tree018aafd7661f0e9d17797a73643a060cd7dabe4b /src/handlers
parenteb190e3f9447e4d49cfdcb5a0093443ca8b684fe (diff)
downloadniri-94e5408f46dd1635004748f34ad38ae9f2bc945d.tar.gz
niri-94e5408f46dd1635004748f34ad38ae9f2bc945d.tar.bz2
niri-94e5408f46dd1635004748f34ad38ae9f2bc945d.zip
Update Smithay
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs9
-rw-r--r--src/handlers/xdg_shell.rs33
2 files changed, 15 insertions, 27 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 63bde132..6b0c2c6b 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -143,6 +143,15 @@ impl PointerConstraintsHandler for State {
&self.niri.pointer_focus,
);
}
+
+ fn cursor_position_hint(
+ &mut self,
+ _surface: &WlSurface,
+ _pointer: &PointerHandle<Self>,
+ _location: Point<f64, Logical>,
+ ) {
+ // FIXME
+ }
}
delegate_pointer_constraints!(State);
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index 80dd2262..06c60a4c 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -27,8 +27,8 @@ use smithay::wayland::shell::kde::decoration::{KdeDecorationHandler, KdeDecorati
use smithay::wayland::shell::wlr_layer::{self, Layer};
use smithay::wayland::shell::xdg::decoration::XdgDecorationHandler;
use smithay::wayland::shell::xdg::{
- PopupSurface, PositionerState, ToplevelSurface, XdgPopupSurfaceData, XdgShellHandler,
- XdgShellState, XdgToplevelSurfaceData,
+ PopupSurface, PositionerState, ToplevelSurface, XdgShellHandler, XdgShellState,
+ XdgToplevelSurfaceData,
};
use smithay::wayland::xdg_foreign::{XdgForeignHandler, XdgForeignState};
use smithay::{
@@ -261,7 +261,7 @@ impl XdgShellHandler for State {
// A configure is required in response to this event. However, if an initial configure
// wasn't sent, then we will send this as part of the initial configure later.
- if initial_configure_sent(&surface) {
+ if surface.is_initial_configure_sent() {
surface.send_configure();
}
}
@@ -552,7 +552,7 @@ impl XdgDecorationHandler for State {
// A configure is required in response to this event. However, if an initial configure
// wasn't sent, then we will send this as part of the initial configure later.
- if initial_configure_sent(&toplevel) {
+ if toplevel.is_initial_configure_sent() {
toplevel.send_configure();
}
}
@@ -565,7 +565,7 @@ impl XdgDecorationHandler for State {
// A configure is required in response to this event. However, if an initial configure
// wasn't sent, then we will send this as part of the initial configure later.
- if initial_configure_sent(&toplevel) {
+ if toplevel.is_initial_configure_sent() {
toplevel.send_configure();
}
}
@@ -620,18 +620,6 @@ impl XdgForeignHandler for State {
}
delegate_xdg_foreign!(State);
-fn initial_configure_sent(toplevel: &ToplevelSurface) -> bool {
- with_states(toplevel.wl_surface(), |states| {
- states
- .data_map
- .get::<XdgToplevelSurfaceData>()
- .unwrap()
- .lock()
- .unwrap()
- .initial_configure_sent
- })
-}
-
impl State {
pub fn send_initial_configure(&mut self, toplevel: &ToplevelSurface) {
let _span = tracy_client::span!("State::send_initial_configure");
@@ -788,16 +776,7 @@ impl State {
if let Some(popup) = self.niri.popups.find_popup(surface) {
match popup {
PopupKind::Xdg(ref popup) => {
- let initial_configure_sent = with_states(surface, |states| {
- states
- .data_map
- .get::<XdgPopupSurfaceData>()
- .unwrap()
- .lock()
- .unwrap()
- .initial_configure_sent
- });
- if !initial_configure_sent {
+ if !popup.is_initial_configure_sent() {
if let Some(output) = self.output_for_popup(&PopupKind::Xdg(popup.clone()))
{
let scale = output.current_scale();