mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-11-16 07:48:11 +01:00
Cleanup and README: Add attribution
This commit is contained in:
parent
fae6cae0cc
commit
f9c204279c
7 changed files with 14 additions and 17 deletions
|
@ -251,3 +251,6 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
|||
|
||||
# Changelog
|
||||
See [`CHANGELOG.md`](CHANGELOG.md).
|
||||
|
||||
# With Special Thanks To
|
||||
- [Niri](https://github.com/YaLTeR/niri): For all that rendering and protocol stuff I, ahem, *took inspiration* from
|
||||
|
|
10
src/api.rs
10
src/api.rs
|
@ -747,9 +747,9 @@ impl tag_service_server::TagService for TagService {
|
|||
});
|
||||
|
||||
match set_or_toggle {
|
||||
SetOrToggle::Set => tag.set_active(true, state),
|
||||
SetOrToggle::Unset => tag.set_active(false, state),
|
||||
SetOrToggle::Toggle => tag.set_active(!tag.active(), state),
|
||||
SetOrToggle::Set => tag.set_active(true, &mut state.pinnacle),
|
||||
SetOrToggle::Unset => tag.set_active(false, &mut state.pinnacle),
|
||||
SetOrToggle::Toggle => tag.set_active(!tag.active(), &mut state.pinnacle),
|
||||
SetOrToggle::Unspecified => unreachable!(),
|
||||
}
|
||||
|
||||
|
@ -793,9 +793,9 @@ impl tag_service_server::TagService for TagService {
|
|||
|
||||
output.with_state(|op_state| {
|
||||
for op_tag in op_state.tags.iter() {
|
||||
op_tag.set_active(false, state);
|
||||
op_tag.set_active(false, &mut state.pinnacle);
|
||||
}
|
||||
tag.set_active(true, state);
|
||||
tag.set_active(true, &mut state.pinnacle);
|
||||
});
|
||||
|
||||
state.pinnacle.fixup_xwayland_window_layering();
|
||||
|
|
|
@ -822,9 +822,9 @@ impl ForeignToplevelHandler for State {
|
|||
output.with_state(|state| {
|
||||
if state.tags.contains(&tag) {
|
||||
for op_tag in state.tags.iter() {
|
||||
op_tag.set_active(false, self);
|
||||
op_tag.set_active(false, &mut self.pinnacle);
|
||||
}
|
||||
tag.set_active(true, self);
|
||||
tag.set_active(true, &mut self.pinnacle);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ impl XdgShellHandler for State {
|
|||
|
||||
fn new_toplevel(&mut self, surface: ToplevelSurface) {
|
||||
surface.with_pending_state(|state| {
|
||||
state.size = Some((600, 400).into()); // gets wleird-slow-ack working
|
||||
// state.size = Some((600, 400).into()); // gets wleird-slow-ack working
|
||||
state.states.set(xdg_toplevel::State::TiledTop);
|
||||
state.states.set(xdg_toplevel::State::TiledBottom);
|
||||
state.states.set(xdg_toplevel::State::TiledLeft);
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#![warn(missing_docs)]
|
||||
#![warn(clippy::missing_docs_in_private_items)]
|
||||
|
||||
//! Layout transactions.
|
||||
|
||||
use std::{
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#![warn(missing_docs)]
|
||||
#![warn(clippy::missing_docs_in_private_items)]
|
||||
|
||||
//! Render utilities.
|
||||
|
||||
pub mod snapshot;
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::{
|
|||
|
||||
use smithay::output::Output;
|
||||
|
||||
use crate::state::{Pinnacle, State, WithState};
|
||||
use crate::state::{Pinnacle, WithState};
|
||||
|
||||
static TAG_ID_COUNTER: AtomicU32 = AtomicU32::new(0);
|
||||
|
||||
|
@ -88,10 +88,10 @@ impl Tag {
|
|||
self.inner.borrow().active
|
||||
}
|
||||
|
||||
pub fn set_active(&self, active: bool, state: &mut State) {
|
||||
pub fn set_active(&self, active: bool, pinnacle: &mut Pinnacle) {
|
||||
self.inner.borrow_mut().active = active;
|
||||
|
||||
state.pinnacle.signal_state.tag_active.signal(|buf| {
|
||||
pinnacle.signal_state.tag_active.signal(|buf| {
|
||||
buf.push_back(
|
||||
pinnacle_api_defs::pinnacle::signal::v0alpha1::TagActiveResponse {
|
||||
tag_id: Some(self.id().0),
|
||||
|
|
Loading…
Reference in a new issue