Update smithay

Updates for changes in https://github.com/Smithay/smithay/pull/1391.
This commit is contained in:
Ian Douglas Scott 2024-04-16 12:05:22 -07:00 committed by Victoria Brekenfeld
parent 5d5a510691
commit 17ddc7ce24
9 changed files with 27 additions and 25 deletions

2
Cargo.lock generated
View file

@ -4506,7 +4506,7 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
name = "smithay"
version = "0.3.0"
source = "git+https://github.com/smithay//smithay?rev=033df94#033df9407104df60751438131687bac25d20e506"
source = "git+https://github.com/smithay//smithay?rev=eea0d9c#eea0d9c171f30eb50247632fcddbb84f1dd147f0"
dependencies = [
"appendlist",
"ash",

View file

@ -118,4 +118,4 @@ inherits = "release"
lto = "fat"
[patch."https://github.com/Smithay/smithay.git"]
smithay = {git = "https://github.com/smithay//smithay", rev = "033df94"}
smithay = {git = "https://github.com/smithay//smithay", rev = "eea0d9c"}

View file

@ -1682,7 +1682,7 @@ impl State {
pointer.unset_grab(self, serial, time);
}
if keyboard.is_grabbed() {
keyboard.unset_grab();
keyboard.unset_grab(self);
}
}
Action::Workspace(key_num) => {
@ -2302,7 +2302,9 @@ impl State {
if let Some(focus) = keyboard_handle.current_focus() {
if let Some(descriptor) = workspace.node_desc(focus) {
let grab = SwapWindowGrab::new(seat.clone(), descriptor.clone());
keyboard_handle.set_grab(grab, serial);
drop(shell);
keyboard_handle.set_grab(self, grab, serial);
let mut shell = self.common.shell.write().unwrap();
shell.set_overview_mode(
Some(Trigger::KeyboardSwap(pattern, descriptor)),
self.common.event_loop_handle.clone(),

View file

@ -541,7 +541,7 @@ impl PointerGrab<State> for MenuGrab {
.any(|elem| elem.pointer_entered);
if !any_entered {
if event.state == ButtonState::Pressed {
handle.unset_grab(state, event.serial, event.time, true);
handle.unset_grab(self, state, event.serial, event.time, true);
}
} else {
let selected = {
@ -554,7 +554,7 @@ impl PointerGrab<State> for MenuGrab {
selected
};
if selected && event.state == ButtonState::Released {
handle.unset_grab(state, event.serial, event.time, true);
handle.unset_grab(self, state, event.serial, event.time, true);
} else {
handle.button(state, event);
}

View file

@ -444,7 +444,7 @@ impl PointerGrab<State> for MoveGrab {
// While the grab is active, no client has pointer focus
handle.motion(state, None, event);
if !self.window.alive() {
handle.unset_grab(state, event.serial, event.time, true);
handle.unset_grab(self, state, event.serial, event.time, true);
}
}
@ -469,12 +469,12 @@ impl PointerGrab<State> for MoveGrab {
match self.release {
ReleaseMode::NoMouseButtons => {
if handle.current_pressed().is_empty() {
handle.unset_grab(state, event.serial, event.time, true);
handle.unset_grab(self, state, event.serial, event.time, true);
}
}
ReleaseMode::Click => {
if event.state == ButtonState::Pressed {
handle.unset_grab(state, event.serial, event.time, true);
handle.unset_grab(self, state, event.serial, event.time, true);
}
}
}
@ -595,7 +595,7 @@ impl TouchGrab<State> for MoveGrab {
seq: Serial,
) {
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
handle.up(data, event, seq);
@ -621,7 +621,7 @@ impl TouchGrab<State> for MoveGrab {
}
fn cancel(&mut self, data: &mut State, handle: &mut TouchInnerHandle<'_, State>, _seq: Serial) {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
fn start_data(&self) -> &TouchGrabStartData<State> {

View file

@ -144,7 +144,7 @@ impl PointerGrab<State> for ResizeSurfaceGrab {
handle.motion(data, None, event);
if self.update_location(event.location) {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
@ -169,12 +169,12 @@ impl PointerGrab<State> for ResizeSurfaceGrab {
match self.release {
ReleaseMode::NoMouseButtons => {
if handle.current_pressed().is_empty() {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
ReleaseMode::Click => {
if event.state == ButtonState::Pressed {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
}
@ -297,7 +297,7 @@ impl TouchGrab<State> for ResizeSurfaceGrab {
seq: Serial,
) {
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
handle.up(data, event, seq);
@ -313,7 +313,7 @@ impl TouchGrab<State> for ResizeSurfaceGrab {
) {
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot {
if self.update_location(event.location) {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
}
@ -325,7 +325,7 @@ impl TouchGrab<State> for ResizeSurfaceGrab {
}
fn cancel(&mut self, data: &mut State, handle: &mut TouchInnerHandle<'_, State>, _seq: Serial) {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
fn start_data(&self) -> &TouchGrabStartData<State> {

View file

@ -343,7 +343,7 @@ impl PointerGrab<State> for ResizeForkGrab {
handle.motion(data, None, event);
if self.update_location(data, event.location) {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
@ -368,12 +368,12 @@ impl PointerGrab<State> for ResizeForkGrab {
match self.release {
ReleaseMode::NoMouseButtons => {
if handle.current_pressed().is_empty() {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
ReleaseMode::Click => {
if event.state == ButtonState::Pressed {
handle.unset_grab(data, event.serial, event.time, true);
handle.unset_grab(self, data, event.serial, event.time, true);
}
}
}
@ -494,7 +494,7 @@ impl TouchGrab<State> for ResizeForkGrab {
seq: Serial,
) {
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
handle.up(data, event, seq);
@ -510,7 +510,7 @@ impl TouchGrab<State> for ResizeForkGrab {
) {
if event.slot == <Self as TouchGrab<State>>::start_data(self).slot {
if self.update_location(data, event.location) {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
}
@ -522,7 +522,7 @@ impl TouchGrab<State> for ResizeForkGrab {
}
fn cancel(&mut self, data: &mut State, handle: &mut TouchInnerHandle<'_, State>, _seq: Serial) {
handle.unset_grab(data);
handle.unset_grab(self, data);
}
fn start_data(&self) -> &TouchGrabStartData<State> {

View file

@ -41,7 +41,7 @@ impl KeyboardGrab<State> for SwapWindowGrab {
) {
if !matches!(&data.common.shell.read().unwrap().overview_mode, OverviewMode::Started(Trigger::KeyboardSwap(_, d), _) if d == &self.desc)
{
handle.unset_grab(data, serial, false);
handle.unset_grab(self, data, serial, false);
return;
}

View file

@ -98,7 +98,7 @@ impl XdgShellHandler for State {
return;
}
Shell::set_focus(self, grab.current_grab().as_ref(), &seat, Some(serial));
keyboard.set_grab(PopupKeyboardGrab::new(&grab), serial);
keyboard.set_grab(self, PopupKeyboardGrab::new(&grab), serial);
}
if let Some(pointer) = seat.get_pointer() {