autocommit 2022-04-20 20:20:36 CEST
This commit is contained in:
parent
34e665cd8b
commit
dae9e52347
8 changed files with 22 additions and 13 deletions
|
|
@ -42,6 +42,5 @@
|
|||
- xdg-shell
|
||||
- xdg_positioner
|
||||
- set_reactive
|
||||
- xdg_toplevel
|
||||
- set_fullscreen
|
||||
- unset_fullscreen
|
||||
- xdg_popup
|
||||
- grab
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ impl XdgToplevel {
|
|||
) -> Result<(), SetFullscreenError> {
|
||||
let client = &self.xdg.surface.client;
|
||||
let req: SetFullscreen = client.parse(self.deref(), parser)?;
|
||||
self.states.borrow_mut().insert(STATE_FULLSCREEN);
|
||||
'set_fullscreen: {
|
||||
let output = if req.output.is_some() {
|
||||
match client.lookup(req.output)?.global.node.get() {
|
||||
|
|
@ -636,7 +637,7 @@ impl XdgSurfaceExt for XdgToplevel {
|
|||
|
||||
impl SizedFullscreenNode for XdgToplevel {
|
||||
fn on_set_fullscreen(&self, _workspace: &Rc<WorkspaceNode>) {
|
||||
self.states.borrow_mut().insert(STATE_FULLSCREEN);
|
||||
// nothing
|
||||
}
|
||||
|
||||
fn on_unset_fullscreen(&self) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ pub struct ZwpIdleInhibitorV1 {
|
|||
|
||||
impl ZwpIdleInhibitorV1 {
|
||||
fn destroy(&self, parser: MsgParser<'_, '_>) -> Result<(), ZwpIdleInhibitorV1Error> {
|
||||
log::info!("destroy {}", self.id);
|
||||
let _req: Destroy = self.client.parse(self, parser)?;
|
||||
self.client.remove_obj(self)?;
|
||||
if self.surface.idle_inhibitors.remove(&self.id).is_some() {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ impl ZwpIdleInhibitManagerV1 {
|
|||
) -> Result<(), ZwpIdleInhibitManagerV1Error> {
|
||||
let req: CreateInhibitor = self.client.parse(self, parser)?;
|
||||
let surface = self.client.lookup(req.surface)?;
|
||||
log::info!("create {}", req.id);
|
||||
let inhibit = Rc::new(ZwpIdleInhibitorV1 {
|
||||
id: req.id,
|
||||
inhibit_id: self.client.state.idle_inhibitor_ids.next(),
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@ pub enum FindTreeResult {
|
|||
Other,
|
||||
}
|
||||
|
||||
impl FindTreeResult {
|
||||
pub fn accepts_input(self) -> bool {
|
||||
self == Self::AcceptsInput
|
||||
}
|
||||
}
|
||||
|
||||
pub trait SizedNode: Sized + 'static {
|
||||
fn id(&self) -> NodeId;
|
||||
fn seat_state(&self) -> &NodeSeatState;
|
||||
|
|
|
|||
|
|
@ -342,15 +342,14 @@ impl SizedNode for OutputNode {
|
|||
return fs.as_node().node_find_tree_at(x, y, tree);
|
||||
}
|
||||
}
|
||||
let (x_abs, y_abs) = self.global.pos.get().translate_inv(x, y);
|
||||
{
|
||||
if self.find_layer_surface_at(x_abs, y_abs, &[OVERLAY, TOP], tree)
|
||||
== FindTreeResult::AcceptsInput
|
||||
{
|
||||
return FindTreeResult::AcceptsInput;
|
||||
let res = self.find_layer_surface_at(x, y, &[OVERLAY, TOP], tree);
|
||||
if res.accepts_input() {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
{
|
||||
let (x_abs, y_abs) = self.global.pos.get().translate_inv(x, y);
|
||||
for stacked in self.state.root.stacked.rev_iter() {
|
||||
let ext = stacked.node_absolute_position();
|
||||
if stacked.node_absolute_position_constrains_input() && !ext.contains(x_abs, y_abs)
|
||||
|
|
|
|||
|
|
@ -417,8 +417,13 @@ impl Wm {
|
|||
}
|
||||
|
||||
async fn set_fullscreen(&self, data: &Rc<XwindowData>, fullscreen: bool) {
|
||||
data.info.fullscreen.set(fullscreen);
|
||||
self.set_net_wm_state(data).await;
|
||||
if false {
|
||||
// NOTE: We do not want to inform the program if the user changes the fullscreen
|
||||
// status of the window. Programs usually provide an in-program way to enter/exit
|
||||
// fullscreen mode.
|
||||
data.info.fullscreen.set(fullscreen);
|
||||
self.set_net_wm_state(data).await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn send_wm_message(&self, window: &Rc<XwindowData>, event_mask: u32, data: &[u32]) {
|
||||
|
|
|
|||
1
todo.md
1
todo.md
|
|
@ -4,6 +4,7 @@
|
|||
- presentation time
|
||||
- viewporter
|
||||
- session lock
|
||||
- stacked restacking
|
||||
|
||||
# done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue