autocommit 2022-04-11 13:11:56 CEST
This commit is contained in:
parent
6b3316e920
commit
86ca98c38a
11 changed files with 23 additions and 12 deletions
|
|
@ -145,6 +145,8 @@ pub fn configure() {
|
||||||
);
|
);
|
||||||
timer.on_tick(update_status);
|
timer.on_tick(update_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Command::new("mako").spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
config!(configure);
|
config!(configure);
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ fn main_(forker: Rc<ForkerProxy>, logger: Arc<Logger>, _args: &RunArgs) -> Resul
|
||||||
}),
|
}),
|
||||||
handler: Cell::new(None),
|
handler: Cell::new(None),
|
||||||
connected: Cell::new(true),
|
connected: Cell::new(true),
|
||||||
|
name: "Dummy".to_string(),
|
||||||
}),
|
}),
|
||||||
0,
|
0,
|
||||||
&backend::Mode {
|
&backend::Mode {
|
||||||
|
|
|
||||||
|
|
@ -107,11 +107,11 @@ impl WlOutputGlobal {
|
||||||
binding.send_mode();
|
binding.send_mode();
|
||||||
binding.send_scale();
|
binding.send_scale();
|
||||||
binding.send_done();
|
binding.send_done();
|
||||||
binding.client.flush();
|
|
||||||
let xdg = binding.xdg_outputs.lock();
|
let xdg = binding.xdg_outputs.lock();
|
||||||
for xdg in xdg.values() {
|
for xdg in xdg.values() {
|
||||||
xdg.send_updates();
|
xdg.send_updates();
|
||||||
}
|
}
|
||||||
|
binding.client.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,6 @@ impl WlSeatGlobal {
|
||||||
|
|
||||||
fn key_event(&self, key: u32, state: KeyState) {
|
fn key_event(&self, key: u32, state: KeyState) {
|
||||||
let (state, xkb_dir) = {
|
let (state, xkb_dir) = {
|
||||||
log::info!("{} {:?}", key, state);
|
|
||||||
let mut pk = self.pressed_keys.borrow_mut();
|
let mut pk = self.pressed_keys.borrow_mut();
|
||||||
match state {
|
match state {
|
||||||
KeyState::Released => {
|
KeyState::Released => {
|
||||||
|
|
|
||||||
|
|
@ -282,11 +282,19 @@ impl XdgToplevel {
|
||||||
|
|
||||||
fn set_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), SetFullscreenError> {
|
fn set_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), SetFullscreenError> {
|
||||||
let _req: SetFullscreen = self.xdg.surface.client.parse(self, parser)?;
|
let _req: SetFullscreen = self.xdg.surface.client.parse(self, parser)?;
|
||||||
|
self.states.borrow_mut().insert(STATE_FULLSCREEN);
|
||||||
|
let rect = self.xdg.absolute_desired_extents.get();
|
||||||
|
self.send_configure_checked(rect.width(), rect.height());
|
||||||
|
self.xdg.do_send_configure();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unset_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), UnsetFullscreenError> {
|
fn unset_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), UnsetFullscreenError> {
|
||||||
let _req: UnsetFullscreen = self.xdg.surface.client.parse(self, parser)?;
|
let _req: UnsetFullscreen = self.xdg.surface.client.parse(self, parser)?;
|
||||||
|
self.states.borrow_mut().remove(&STATE_FULLSCREEN);
|
||||||
|
let rect = self.xdg.absolute_desired_extents.get();
|
||||||
|
self.send_configure_checked(rect.width(), rect.height());
|
||||||
|
self.xdg.do_send_configure();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub const NAME_SINCE: u32 = 2;
|
pub const NAME_SINCE: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub const DESCRIPTION_SINCE: u32 = 2;
|
pub const DESCRIPTION_SINCE: u32 = 2;
|
||||||
|
|
@ -46,7 +45,6 @@ impl ZxdgOutputV1 {
|
||||||
self.client.event(Done { self_id: self.id });
|
self.client.event(Done { self_id: self.id });
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn send_name(&self, name: &str) {
|
pub fn send_name(&self, name: &str) {
|
||||||
self.client.event(Name {
|
self.client.event(Name {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
@ -66,7 +64,10 @@ impl ZxdgOutputV1 {
|
||||||
let pos = self.output.global.position();
|
let pos = self.output.global.position();
|
||||||
self.send_logical_position(pos.x1(), pos.y1());
|
self.send_logical_position(pos.x1(), pos.y1());
|
||||||
self.send_logical_size(pos.width(), pos.height());
|
self.send_logical_size(pos.width(), pos.height());
|
||||||
if self.version >= NO_DONE_SINCE || self.output.version < SEND_DONE_SINCE {
|
if self.version >= NAME_SINCE {
|
||||||
|
self.send_name(&self.output.global.connector.name);
|
||||||
|
}
|
||||||
|
if self.version >= NO_DONE_SINCE && self.output.version >= SEND_DONE_SINCE {
|
||||||
self.output.send_done();
|
self.output.send_done();
|
||||||
} else {
|
} else {
|
||||||
self.send_done();
|
self.send_done();
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,7 @@ impl Logger {
|
||||||
fn create_log_dir() -> BString {
|
fn create_log_dir() -> BString {
|
||||||
let mut log_dir = match dirs::data_local_dir() {
|
let mut log_dir = match dirs::data_local_dir() {
|
||||||
Some(d) => d,
|
Some(d) => d,
|
||||||
None => {
|
None => fatal!("Error: $HOME is not set"),
|
||||||
eprintln!("Error: $HOME is not set");
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
log_dir.push("jay");
|
log_dir.push("jay");
|
||||||
let res = DirBuilder::new()
|
let res = DirBuilder::new()
|
||||||
|
|
@ -123,12 +120,11 @@ fn create_log_dir() -> BString {
|
||||||
.mode(0o755)
|
.mode(0o755)
|
||||||
.create(&log_dir);
|
.create(&log_dir);
|
||||||
if let Err(e) = res {
|
if let Err(e) = res {
|
||||||
eprintln!(
|
fatal!(
|
||||||
"Error: Could not create log directory {}: {}",
|
"Error: Could not create log directory {}: {}",
|
||||||
log_dir.display(),
|
log_dir.display(),
|
||||||
ErrorFmt(e)
|
ErrorFmt(e)
|
||||||
);
|
);
|
||||||
std::process::exit(1);
|
|
||||||
}
|
}
|
||||||
log_dir.into_os_string().into_vec().into()
|
log_dir.into_os_string().into_vec().into()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ pub struct ConnectorData {
|
||||||
pub connector: Rc<dyn Connector>,
|
pub connector: Rc<dyn Connector>,
|
||||||
pub handler: Cell<Option<SpawnedFuture<()>>>,
|
pub handler: Cell<Option<SpawnedFuture<()>>>,
|
||||||
pub connected: Cell<bool>,
|
pub connected: Cell<bool>,
|
||||||
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct OutputData {
|
pub struct OutputData {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ pub fn handle(state: &Rc<State>, connector: &Rc<dyn Connector>) {
|
||||||
connector: connector.clone(),
|
connector: connector.clone(),
|
||||||
handler: Default::default(),
|
handler: Default::default(),
|
||||||
connected: Cell::new(false),
|
connected: Cell::new(false),
|
||||||
|
name: connector.kernel_id().to_string(),
|
||||||
});
|
});
|
||||||
let oh = ConnectorHandler {
|
let oh = ConnectorHandler {
|
||||||
id,
|
id,
|
||||||
|
|
@ -120,6 +121,7 @@ impl ConnectorHandler {
|
||||||
if let Some(config) = self.state.config.get() {
|
if let Some(config) = self.state.config.get() {
|
||||||
config.connector_connected(self.id);
|
config.connector_connected(self.id);
|
||||||
}
|
}
|
||||||
|
on.update_render_data();
|
||||||
self.state.root.outputs.set(self.id, on.clone());
|
self.state.root.outputs.set(self.id, on.clone());
|
||||||
self.state.add_global(&global);
|
self.state.add_global(&global);
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
|
|
|
||||||
|
|
@ -690,6 +690,7 @@ impl ContainerNode {
|
||||||
child.node.clone().do_focus(&seat, Direction::Unspecified);
|
child.node.clone().do_focus(&seat, Direction::Unspecified);
|
||||||
}
|
}
|
||||||
self.mono_child.set(Some(child.clone()));
|
self.mono_child.set(Some(child.clone()));
|
||||||
|
child.node.set_visible(true);
|
||||||
self.schedule_layout();
|
self.schedule_layout();
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -593,7 +593,7 @@ impl Wm {
|
||||||
{
|
{
|
||||||
Ok(ty) if ty == ATOM_STRING && data.info.utf8_title.get() => return,
|
Ok(ty) if ty == ATOM_STRING && data.info.utf8_title.get() => return,
|
||||||
Ok(ty) if ty == ATOM_STRING => {}
|
Ok(ty) if ty == ATOM_STRING => {}
|
||||||
Ok(ty) if ty == self.atoms.COMPOUND_TEXT => {} // used by java. assume utf-8.
|
Ok(ty) if ty == self.atoms.COMPOUND_TEXT => return, // used by java.
|
||||||
Ok(ty) if ty == self.atoms.UTF8_STRING => {
|
Ok(ty) if ty == self.atoms.UTF8_STRING => {
|
||||||
data.info.utf8_title.set(true);
|
data.info.utf8_title.set(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue