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);
|
||||
}
|
||||
|
||||
Command::new("mako").spawn();
|
||||
}
|
||||
|
||||
config!(configure);
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ fn main_(forker: Rc<ForkerProxy>, logger: Arc<Logger>, _args: &RunArgs) -> Resul
|
|||
}),
|
||||
handler: Cell::new(None),
|
||||
connected: Cell::new(true),
|
||||
name: "Dummy".to_string(),
|
||||
}),
|
||||
0,
|
||||
&backend::Mode {
|
||||
|
|
|
|||
|
|
@ -107,11 +107,11 @@ impl WlOutputGlobal {
|
|||
binding.send_mode();
|
||||
binding.send_scale();
|
||||
binding.send_done();
|
||||
binding.client.flush();
|
||||
let xdg = binding.xdg_outputs.lock();
|
||||
for xdg in xdg.values() {
|
||||
xdg.send_updates();
|
||||
}
|
||||
binding.client.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,6 @@ impl WlSeatGlobal {
|
|||
|
||||
fn key_event(&self, key: u32, state: KeyState) {
|
||||
let (state, xkb_dir) = {
|
||||
log::info!("{} {:?}", key, state);
|
||||
let mut pk = self.pressed_keys.borrow_mut();
|
||||
match state {
|
||||
KeyState::Released => {
|
||||
|
|
|
|||
|
|
@ -282,11 +282,19 @@ impl XdgToplevel {
|
|||
|
||||
fn set_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), SetFullscreenError> {
|
||||
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(())
|
||||
}
|
||||
|
||||
fn unset_fullscreen(&self, parser: MsgParser<'_, '_>) -> Result<(), UnsetFullscreenError> {
|
||||
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(())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ use {
|
|||
thiserror::Error,
|
||||
};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub const NAME_SINCE: u32 = 2;
|
||||
#[allow(dead_code)]
|
||||
pub const DESCRIPTION_SINCE: u32 = 2;
|
||||
|
|
@ -46,7 +45,6 @@ impl ZxdgOutputV1 {
|
|||
self.client.event(Done { self_id: self.id });
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn send_name(&self, name: &str) {
|
||||
self.client.event(Name {
|
||||
self_id: self.id,
|
||||
|
|
@ -66,7 +64,10 @@ impl ZxdgOutputV1 {
|
|||
let pos = self.output.global.position();
|
||||
self.send_logical_position(pos.x1(), pos.y1());
|
||||
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();
|
||||
} else {
|
||||
self.send_done();
|
||||
|
|
|
|||
|
|
@ -112,10 +112,7 @@ impl Logger {
|
|||
fn create_log_dir() -> BString {
|
||||
let mut log_dir = match dirs::data_local_dir() {
|
||||
Some(d) => d,
|
||||
None => {
|
||||
eprintln!("Error: $HOME is not set");
|
||||
std::process::exit(1);
|
||||
}
|
||||
None => fatal!("Error: $HOME is not set"),
|
||||
};
|
||||
log_dir.push("jay");
|
||||
let res = DirBuilder::new()
|
||||
|
|
@ -123,12 +120,11 @@ fn create_log_dir() -> BString {
|
|||
.mode(0o755)
|
||||
.create(&log_dir);
|
||||
if let Err(e) = res {
|
||||
eprintln!(
|
||||
fatal!(
|
||||
"Error: Could not create log directory {}: {}",
|
||||
log_dir.display(),
|
||||
ErrorFmt(e)
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
log_dir.into_os_string().into_vec().into()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ pub struct ConnectorData {
|
|||
pub connector: Rc<dyn Connector>,
|
||||
pub handler: Cell<Option<SpawnedFuture<()>>>,
|
||||
pub connected: Cell<bool>,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
pub struct OutputData {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ pub fn handle(state: &Rc<State>, connector: &Rc<dyn Connector>) {
|
|||
connector: connector.clone(),
|
||||
handler: Default::default(),
|
||||
connected: Cell::new(false),
|
||||
name: connector.kernel_id().to_string(),
|
||||
});
|
||||
let oh = ConnectorHandler {
|
||||
id,
|
||||
|
|
@ -120,6 +121,7 @@ impl ConnectorHandler {
|
|||
if let Some(config) = self.state.config.get() {
|
||||
config.connector_connected(self.id);
|
||||
}
|
||||
on.update_render_data();
|
||||
self.state.root.outputs.set(self.id, on.clone());
|
||||
self.state.add_global(&global);
|
||||
'outer: loop {
|
||||
|
|
|
|||
|
|
@ -690,6 +690,7 @@ impl ContainerNode {
|
|||
child.node.clone().do_focus(&seat, Direction::Unspecified);
|
||||
}
|
||||
self.mono_child.set(Some(child.clone()));
|
||||
child.node.set_visible(true);
|
||||
self.schedule_layout();
|
||||
} 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 => {}
|
||||
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 => {
|
||||
data.info.utf8_title.set(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue