1
0
Fork 0
forked from wry/wry

all: use let chains

This commit is contained in:
Julian Orth 2025-07-01 11:20:48 +02:00
parent 3d5d146d65
commit 286857971a
89 changed files with 1516 additions and 1574 deletions

View file

@ -87,11 +87,11 @@ impl ZwpTextInputManagerV3RequestHandler for ZwpTextInputManagerV3 {
.entry(self.client.id)
.or_default()
.set(req.id, ti.clone());
if let Some(surface) = seat.global.keyboard_node.get().node_into_surface() {
if surface.client.id == self.client.id {
ti.send_enter(&surface);
ti.send_done();
}
if let Some(surface) = seat.global.keyboard_node.get().node_into_surface()
&& surface.client.id == self.client.id
{
ti.send_enter(&surface);
ti.send_done();
}
Ok(())
}

View file

@ -252,11 +252,11 @@ impl ZwpTextInputV3RequestHandler for ZwpTextInputV3 {
}
let con = self.connection.get();
if let Some(val) = pending.cursor_rect {
if state.cursor_rectangle != val {
if let Some(con) = &con {
for (_, popup) in &con.input_method.popups {
popup.schedule_positioning();
}
if state.cursor_rectangle != val
&& let Some(con) = &con
{
for (_, popup) in &con.input_method.popups {
popup.schedule_positioning();
}
}
state.cursor_rectangle = val;
@ -282,10 +282,8 @@ impl ZwpTextInputV3RequestHandler for ZwpTextInputV3 {
}
state.surrounding_text = val;
}
if sent_any {
if let Some(con) = &con {
con.input_method.send_done();
}
if sent_any && let Some(con) = &con {
con.input_method.send_done();
}
Ok(())
}