autocommit 2022-03-13 22:20:31 CET
This commit is contained in:
parent
156bd5b042
commit
a15a02a95c
38 changed files with 63 additions and 66 deletions
|
|
@ -11,7 +11,6 @@ use crate::ErrorFmt;
|
|||
use bstr::ByteSlice;
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
use std::time::Instant;
|
||||
use uapi::{c, OwnedFd};
|
||||
|
||||
const DRM: &[u8] = b"drm";
|
||||
|
|
@ -91,7 +90,6 @@ impl MetalBackend {
|
|||
}
|
||||
|
||||
fn handle_input_device_resume(self: &Rc<Self>, dev: &Rc<MetalInputDevice>, fd: Rc<OwnedFd>) {
|
||||
let start = Instant::now();
|
||||
log::info!("Device resumed: {}", dev.devnode.to_bytes().as_bstr());
|
||||
if let Some(old) = dev.fd.set(Some(fd)) {
|
||||
self.state.fdcloser.close(old);
|
||||
|
|
@ -100,7 +98,6 @@ impl MetalBackend {
|
|||
Ok(d) => d,
|
||||
Err(_) => return,
|
||||
};
|
||||
log::info!("took {:?}", start.elapsed());
|
||||
inputdev.device().set_slot(dev.slot);
|
||||
dev.inputdev.set(Some(inputdev));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ impl MetalBackend {
|
|||
mode.hdisplay as _,
|
||||
mode.vdisplay as _,
|
||||
)?)
|
||||
},
|
||||
}
|
||||
};
|
||||
changes.change_object(primary_plane.id, |c| {
|
||||
c.change(primary_plane.fb_id, buffers[0].drm.id().0 as _);
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ impl XorgBackend {
|
|||
images,
|
||||
});
|
||||
{
|
||||
let class = "i4\0i4\0";
|
||||
let class = "jay\0jay\0";
|
||||
let cookie = con.xcb.xcb_change_property_checked(
|
||||
con.c,
|
||||
ffi::XCB_PROP_MODE_REPLACE as _,
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ use crate::config::handler::ConfigProxyHandler;
|
|||
use crate::ifs::wl_seat::SeatId;
|
||||
use crate::utils::ptr_ext::PtrExt;
|
||||
use crate::{NumCell, State};
|
||||
use i4config::_private::ipc::{InitMessage, ServerMessage, V1InitMessage};
|
||||
use i4config::_private::{bincode_ops, ConfigEntry, VERSION};
|
||||
use i4config::keyboard::ModifiedKeySym;
|
||||
use i4config::{InputDevice, Seat};
|
||||
use jay_config::_private::ipc::{InitMessage, ServerMessage, V1InitMessage};
|
||||
use jay_config::_private::{bincode_ops, ConfigEntry, VERSION};
|
||||
use jay_config::keyboard::ModifiedKeySym;
|
||||
use jay_config::{InputDevice, Seat};
|
||||
use libloading::Library;
|
||||
use std::cell::Cell;
|
||||
use std::ptr;
|
||||
|
|
@ -68,7 +68,7 @@ unsafe extern "C" fn default_client_init(
|
|||
extern "C" fn configure() {
|
||||
default_config::configure();
|
||||
}
|
||||
i4config::_private::client::init(srv_data, srv_unref, srv_handler, msg, size, configure)
|
||||
jay_config::_private::client::init(srv_data, srv_unref, srv_handler, msg, size, configure)
|
||||
}
|
||||
|
||||
impl ConfigProxy {
|
||||
|
|
@ -106,8 +106,8 @@ impl ConfigProxy {
|
|||
let entry = ConfigEntry {
|
||||
version: VERSION,
|
||||
init: default_client_init,
|
||||
unref: i4config::_private::client::unref,
|
||||
handle_msg: i4config::_private::client::handle_msg,
|
||||
unref: jay_config::_private::client::unref,
|
||||
handle_msg: jay_config::_private::client::handle_msg,
|
||||
};
|
||||
Self::new(None, &entry, state)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ use crate::utils::stack::Stack;
|
|||
use crate::xkbcommon::XkbKeymap;
|
||||
use crate::{backend, ErrorFmt, NumCell, State};
|
||||
use bincode::error::DecodeError;
|
||||
use i4config::_private::bincode_ops;
|
||||
use i4config::_private::ipc::{ClientMessage, Response, ServerMessage};
|
||||
use i4config::keyboard::keymap::Keymap;
|
||||
use i4config::keyboard::mods::Modifiers;
|
||||
use i4config::keyboard::syms::KeySym;
|
||||
use i4config::{Axis, Direction, InputDevice, LogLevel, Seat};
|
||||
use jay_config::_private::bincode_ops;
|
||||
use jay_config::_private::ipc::{ClientMessage, Response, ServerMessage};
|
||||
use jay_config::keyboard::keymap::Keymap;
|
||||
use jay_config::keyboard::mods::Modifiers;
|
||||
use jay_config::keyboard::syms::KeySym;
|
||||
use jay_config::{Axis, Direction, InputDevice, LogLevel, Seat};
|
||||
use libloading::Library;
|
||||
use log::Level;
|
||||
use std::cell::Cell;
|
||||
|
|
@ -397,20 +397,20 @@ impl ConfigProxyHandler {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_set_title_color(&self, color: i4config::theme::Color) {
|
||||
fn handle_set_title_color(&self, color: jay_config::theme::Color) {
|
||||
self.state.theme.title_color.set(color.into());
|
||||
self.colors_change();
|
||||
}
|
||||
|
||||
fn handle_set_border_color(&self, color: i4config::theme::Color) {
|
||||
fn handle_set_border_color(&self, color: jay_config::theme::Color) {
|
||||
self.state.theme.border_color.set(color.into());
|
||||
}
|
||||
|
||||
fn handle_set_background_color(&self, color: i4config::theme::Color) {
|
||||
fn handle_set_background_color(&self, color: jay_config::theme::Color) {
|
||||
self.state.theme.background_color.set(color.into());
|
||||
}
|
||||
|
||||
fn handle_set_title_underline_color(&self, color: i4config::theme::Color) {
|
||||
fn handle_set_title_underline_color(&self, color: jay_config::theme::Color) {
|
||||
self.state.theme.underline_color.set(color.into());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use crate::utils::copyhashmap::CopyHashMap;
|
|||
use crate::{xwayland, AsyncEngine, AsyncQueue, ErrorFmt, EventLoop, NumCell, State, Wheel};
|
||||
use bincode::error::{DecodeError, EncodeError};
|
||||
use bincode::{Decode, Encode};
|
||||
use i4config::_private::bincode_ops;
|
||||
use jay_config::_private::bincode_ops;
|
||||
use log::Level;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::env;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::async_engine::AsyncFd;
|
|||
use crate::utils::buffd::{BufFdIn, BufFdOut};
|
||||
use crate::utils::vec_ext::VecExt;
|
||||
use crate::ForkerError;
|
||||
use i4config::_private::bincode_ops;
|
||||
use jay_config::_private::bincode_ops;
|
||||
use uapi::OwnedFd;
|
||||
|
||||
pub struct IoIn {
|
||||
|
|
|
|||
|
|
@ -175,8 +175,8 @@ impl WlOutput {
|
|||
physical_width: pos.width(),
|
||||
physical_height: pos.height(),
|
||||
subpixel: SP_UNKNOWN,
|
||||
make: "i4",
|
||||
model: "i4",
|
||||
make: "jay",
|
||||
model: "jay",
|
||||
transform: TF_NORMAL,
|
||||
};
|
||||
self.client.event(event);
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ use crate::xkbcommon::{XkbKeymap, XkbState};
|
|||
use crate::{ErrorFmt, NumCell, State};
|
||||
use ahash::{AHashMap, AHashSet};
|
||||
pub use event_handling::NodeSeatState;
|
||||
use i4config::keyboard::mods::Modifiers;
|
||||
use i4config::Direction;
|
||||
use jay_config::keyboard::mods::Modifiers;
|
||||
use jay_config::Direction;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::mem;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ use crate::utils::clonecell::CloneCell;
|
|||
use crate::utils::smallmap::SmallMap;
|
||||
use crate::wire::WlDataOfferId;
|
||||
use crate::xkbcommon::{ModifierState, XKB_KEY_DOWN, XKB_KEY_UP};
|
||||
use i4config::keyboard::mods::Modifiers;
|
||||
use i4config::keyboard::syms::KeySym;
|
||||
use i4config::keyboard::ModifiedKeySym;
|
||||
use jay_config::keyboard::mods::Modifiers;
|
||||
use jay_config::keyboard::syms::KeySym;
|
||||
use jay_config::keyboard::ModifiedKeySym;
|
||||
use smallvec::SmallVec;
|
||||
use std::ops::Deref;
|
||||
use std::rc::Rc;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use crate::wire::{WlOutputId, WlSurfaceId};
|
|||
use crate::xkbcommon::ModifierState;
|
||||
use crate::NumCell;
|
||||
use ahash::AHashMap;
|
||||
use i4config::Direction;
|
||||
use jay_config::Direction;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::mem;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use crate::utils::smallmap::SmallMap;
|
|||
use crate::wire::xdg_surface::*;
|
||||
use crate::wire::{WlSurfaceId, XdgPopupId, XdgSurfaceId};
|
||||
use crate::NumCell;
|
||||
use i4config::Direction;
|
||||
use jay_config::Direction;
|
||||
use std::cell::Cell;
|
||||
use std::fmt::Debug;
|
||||
use std::rc::Rc;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use crate::wire::xdg_toplevel::*;
|
|||
use crate::wire::XdgToplevelId;
|
||||
use crate::{bugs, NumCell};
|
||||
use ahash::{AHashMap, AHashSet};
|
||||
use i4config::Direction;
|
||||
use jay_config::Direction;
|
||||
use num_derive::FromPrimitive;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::utils::smallmap::SmallMap;
|
|||
use crate::wire::WlSurfaceId;
|
||||
use crate::xwayland::XWaylandEvent;
|
||||
use crate::{AsyncQueue, CloneCell, State};
|
||||
use i4config::Direction;
|
||||
use jay_config::Direction;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ use crate::tree::{
|
|||
use crate::udev::Udev;
|
||||
use crate::utils::clonecell::CloneCell;
|
||||
use crate::utils::errorfmt::ErrorFmt;
|
||||
use crate::utils::fdcloser::FdCloser;
|
||||
use crate::utils::numcell::NumCell;
|
||||
use crate::utils::queue::AsyncQueue;
|
||||
use crate::utils::run_toplevel::RunToplevel;
|
||||
|
|
@ -55,7 +56,6 @@ use std::ops::Deref;
|
|||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
use wheel::Wheel;
|
||||
use crate::utils::fdcloser::FdCloser;
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ use crate::tree::{
|
|||
};
|
||||
use crate::utils::clonecell::CloneCell;
|
||||
use crate::utils::copyhashmap::CopyHashMap;
|
||||
use crate::utils::fdcloser::FdCloser;
|
||||
use crate::utils::linkedlist::LinkedList;
|
||||
use crate::utils::numcell::NumCell;
|
||||
use crate::utils::queue::AsyncQueue;
|
||||
|
|
@ -29,7 +30,6 @@ use ahash::AHashMap;
|
|||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use crate::utils::fdcloser::FdCloser;
|
||||
|
||||
pub struct State {
|
||||
pub xkb_ctx: XkbContext,
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ impl Color {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<i4config::theme::Color> for Color {
|
||||
fn from(f: i4config::theme::Color) -> Self {
|
||||
impl From<jay_config::theme::Color> for Color {
|
||||
fn from(f: jay_config::theme::Color) -> Self {
|
||||
Self {
|
||||
r: to_f32(f.r),
|
||||
g: to_f32(f.g),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use crate::utils::clonecell::CloneCell;
|
|||
use crate::utils::linkedlist::{LinkedList, LinkedNode, NodeRef};
|
||||
use crate::{text, ErrorFmt, NumCell, State};
|
||||
use ahash::AHashMap;
|
||||
use i4config::{Axis, Direction};
|
||||
use jay_config::{Axis, Direction};
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
||||
use std::fmt::{Debug, Formatter};
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use crate::xkbcommon::ModifierState;
|
|||
use crate::NumCell;
|
||||
pub use container::*;
|
||||
pub use float::*;
|
||||
use i4config::Direction;
|
||||
use jay_config::Direction;
|
||||
pub use output::*;
|
||||
use std::fmt::{Debug, Display};
|
||||
use std::ops::Deref;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use parking_lot::{Condvar, Mutex};
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use parking_lot::{Condvar, Mutex};
|
||||
use uapi::OwnedFd;
|
||||
|
||||
pub struct FdCloser {
|
||||
|
|
@ -38,7 +38,7 @@ impl FdCloser {
|
|||
Ok(fd) => {
|
||||
self.fds.lock().push(fd);
|
||||
self.cv.notify_all();
|
||||
},
|
||||
}
|
||||
Err(_e) => {
|
||||
log::warn!("Could not close file descriptor in separate thread. There are still references.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ pub mod clonecell;
|
|||
pub mod copyhashmap;
|
||||
pub mod debug_fn;
|
||||
pub mod errorfmt;
|
||||
pub mod fdcloser;
|
||||
pub mod hex;
|
||||
pub mod linkedlist;
|
||||
pub mod nonblock;
|
||||
|
|
@ -22,4 +23,3 @@ pub mod tri;
|
|||
pub mod vasprintf;
|
||||
pub mod vec_ext;
|
||||
pub mod vecstorage;
|
||||
pub mod fdcloser;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue