Integrate native Rime and stabilize input, output, and rendering
- Add optional modifier-only Super binding whose tap is cancelled by other input, focus changes, grabs, locks, and session teardown. - Ship the native ferese-rime user service, Rime defaults, installer inventory, package dependencies, session environment, and docs. - Vendor Smithay 8a27023 with the SHM texture-cache format fix and add GPU regressions for format changes and resize snapshots. - Release reused CRTC owners before staging output modes, then restore changed outputs before former owners when a transaction fails. - Wait for resize-capture GPU completion, expand filtered surface damage, and preserve IME popup origin under fractional scaling. - Mark weekends like holidays in both calendar layouts.
This commit is contained in:
1 parent
a2be421974
commit
993bc0f88f
391 files changed
+130908
-76
No files matched your search
@@ -123,6 +123,7 @@ pub(super) fn parse_binding(
|
||||
BindingMatch::Keysym => BindingTrigger::Keysym(identity.key),
|
||||
BindingMatch::Physical => BindingTrigger::Physical(Keycode::new(identity.key)),
|
||||
BindingMatch::Pointer => BindingTrigger::Pointer(PointerTrigger::from_key(identity.key)),
|
||||
BindingMatch::SuperTap => BindingTrigger::SuperTap,
|
||||
BindingMatch::Swipe => BindingTrigger::Swipe {
|
||||
fingers: identity.key / 4,
|
||||
direction: [
|
||||
@@ -154,6 +155,21 @@ pub(super) fn binding_identity(
|
||||
configured: &BindingConfig,
|
||||
keymap: &xkb::Keymap,
|
||||
) -> Result<BindingIdentity, ConfigError> {
|
||||
if matches!(
|
||||
configured.keys.trim().to_ascii_lowercase().as_str(),
|
||||
"super" | "logo" | "mod4"
|
||||
) {
|
||||
if configured.match_mode != BindingMatch::Keysym {
|
||||
return Err(ConfigError::Binding(
|
||||
"Super tap cannot use physical key matching".into(),
|
||||
));
|
||||
}
|
||||
return Ok(BindingIdentity {
|
||||
modifiers: BindingModifiers::default(),
|
||||
match_mode: BindingMatch::SuperTap,
|
||||
key: 0,
|
||||
});
|
||||
}
|
||||
let (modifiers, key) = parse_chord(&configured.keys)?;
|
||||
if let Some(trigger) = PointerTrigger::parse(&key)? {
|
||||
if configured.match_mode != BindingMatch::Keysym {
|
||||
@@ -192,7 +208,7 @@ pub(super) fn binding_identity(
|
||||
configured.keys
|
||||
))
|
||||
})?,
|
||||
BindingMatch::Swipe | BindingMatch::Pointer => {
|
||||
BindingMatch::Swipe | BindingMatch::Pointer | BindingMatch::SuperTap => {
|
||||
return Err(ConfigError::Binding(
|
||||
"gesture keys must use Swipe3Left/Right/Up/Down (3–5 fingers)".into(),
|
||||
));
|
||||
@@ -211,6 +227,7 @@ pub(super) fn binding_identity_for_runtime(binding: &Binding) -> BindingIdentity
|
||||
BindingTrigger::Keysym(key) => (BindingMatch::Keysym, key),
|
||||
BindingTrigger::Physical(key) => (BindingMatch::Physical, key.raw()),
|
||||
BindingTrigger::Pointer(trigger) => (BindingMatch::Pointer, trigger.key()),
|
||||
BindingTrigger::SuperTap => (BindingMatch::SuperTap, 0),
|
||||
BindingTrigger::Swipe { fingers, direction } => {
|
||||
(BindingMatch::Swipe, fingers * 4 + direction as u32)
|
||||
}
|
||||
@@ -574,6 +591,7 @@ pub(super) enum BindingTrigger {
|
||||
Keysym(u32),
|
||||
Physical(Keycode),
|
||||
Pointer(PointerTrigger),
|
||||
SuperTap,
|
||||
Swipe {
|
||||
fingers: u32,
|
||||
direction: crate::gestures::SwipeDirection,
|
||||
@@ -679,6 +697,7 @@ impl Binding {
|
||||
})
|
||||
}
|
||||
(BindingTrigger::Physical(left), BindingTrigger::Physical(right)) => left == right,
|
||||
(BindingTrigger::SuperTap, BindingTrigger::SuperTap) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
@@ -702,7 +721,9 @@ impl Binding {
|
||||
&& match self.trigger {
|
||||
BindingTrigger::Keysym(expected) => keysyms.contains(&expected),
|
||||
BindingTrigger::Physical(expected) => expected == keycode,
|
||||
BindingTrigger::Swipe { .. } | BindingTrigger::Pointer(_) => false,
|
||||
BindingTrigger::Swipe { .. }
|
||||
| BindingTrigger::Pointer(_)
|
||||
| BindingTrigger::SuperTap => false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,6 +818,7 @@ impl Binding {
|
||||
}
|
||||
}
|
||||
parts.push(match self.trigger {
|
||||
BindingTrigger::SuperTap => "Super (tap)".into(),
|
||||
BindingTrigger::Pointer(trigger) => trigger.label(),
|
||||
BindingTrigger::Keysym(symbol) => {
|
||||
let name = xkb::keysym_get_name(xkb::Keysym::new(symbol));
|
||||
@@ -852,6 +874,8 @@ pub(super) enum BindingMatch {
|
||||
Swipe,
|
||||
#[serde(skip)]
|
||||
Pointer,
|
||||
#[serde(skip)]
|
||||
SuperTap,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, schemars::JsonSchema, serde::Serialize)]
|
||||
|
||||
@@ -27,7 +27,10 @@ impl From<Vec<Binding>> for BindingSet {
|
||||
|
||||
if matches!(
|
||||
identity.match_mode,
|
||||
BindingMatch::Keysym | BindingMatch::Physical | BindingMatch::Pointer
|
||||
BindingMatch::Keysym
|
||||
| BindingMatch::Physical
|
||||
| BindingMatch::Pointer
|
||||
| BindingMatch::SuperTap
|
||||
) {
|
||||
index.entry(identity).or_insert(position);
|
||||
}
|
||||
@@ -46,6 +49,16 @@ impl std::ops::Deref for BindingSet {
|
||||
}
|
||||
|
||||
impl BindingSet {
|
||||
pub(crate) fn super_tap(&self) -> Option<&Binding> {
|
||||
self.index
|
||||
.get(&BindingIdentity {
|
||||
modifiers: BindingModifiers::default(),
|
||||
match_mode: BindingMatch::SuperTap,
|
||||
key: 0,
|
||||
})
|
||||
.map(|index| &self.ordered[*index])
|
||||
}
|
||||
|
||||
pub(crate) fn binding_for_pointer(
|
||||
&self,
|
||||
trigger: super::PointerTrigger,
|
||||
|
||||
Reference in new issue
Block a user