Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split off KeyboardHandle::filter callback to separate method #862

Merged
merged 6 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ inherits = "release"
lto = "fat"

[patch."https://github.com/Smithay/smithay.git"]
smithay = { git = "https://github.com/smithay//smithay", rev = "f364c73" }
smithay = { git = "https://github.com/smithay//smithay", rev = "08d31e1" }
2 changes: 1 addition & 1 deletion src/backend/kms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn init_libinput(
state.backend.kms().input_devices.remove(device.name());
}

state.process_input_event(event, true);
state.process_input_event(event);

for output in state.common.shell.read().unwrap().outputs() {
state.backend.kms().schedule_render(output);
Expand Down
2 changes: 1 addition & 1 deletion src/backend/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl State {
render_ping.ping();
}
WinitEvent::Redraw => render_ping.ping(),
WinitEvent::Input(event) => self.process_input_event(event, false),
WinitEvent::Input(event) => self.process_input_event(event),
WinitEvent::CloseRequested => {
self.common.should_stop = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ impl State {
_ => {}
};

self.process_input_event(event, false);
self.process_input_event(event);
// TODO actually figure out the output
for output in self.common.shell.read().unwrap().outputs() {
self.backend.x11().schedule_render(output);
Expand Down
4 changes: 3 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ impl Config {
.shell
.write()
.unwrap()
.update_tiling_exceptions(state.common.config.tiling_exceptions.iter());
.update_tiling_exceptions(
state.common.config.tiling_exceptions.iter(),
);
}
_ => (),
}
Expand Down
741 changes: 411 additions & 330 deletions src/input/mod.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/shell/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct TilingExceptions {
impl TilingExceptions {
pub fn new<'a, I>(exceptions_config: I) -> Self
where
I: Iterator<Item=&'a ApplicationException>
I: Iterator<Item = &'a ApplicationException>,
{
let mut app_ids = Vec::new();
let mut titles = Vec::new();
Expand Down
7 changes: 3 additions & 4 deletions src/shell/layout/tiling/grabs/swap.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmic_settings_config::shortcuts;
use smithay::{
backend::input::KeyState,
backend::input::{KeyState, Keycode},
input::{
keyboard::{
GrabStartData as KeyboardGrabStartData, KeyboardGrab, KeyboardInnerHandle,
Expand All @@ -10,7 +10,6 @@ use smithay::{
},
utils::Serial,
};
use xkbcommon::xkb::Keysym;

use crate::{
config::key_bindings::cosmic_modifiers_from_smithay,
Expand All @@ -34,7 +33,7 @@ impl KeyboardGrab<State> for SwapWindowGrab {
&mut self,
data: &mut State,
handle: &mut KeyboardInnerHandle<'_, State>,
keycode: u32,
keycode: Keycode,
state: KeyState,
modifiers: Option<ModifiersState>,
serial: Serial,
Expand Down Expand Up @@ -81,7 +80,7 @@ impl KeyboardGrab<State> for SwapWindowGrab {
modifiers: modifiers
.map(cosmic_modifiers_from_smithay)
.unwrap_or_default(),
key: Some(Keysym::new(keycode)),
key: Some(handle.keysym_handle(keycode).modified_sym()),
description: None,
},
None,
Expand Down
Loading