1
0
Fork 0
forked from wry/wry

autocommit 2022-02-05 02:07:07 CET

This commit is contained in:
Julian Orth 2022-02-05 02:07:07 +01:00
parent 89bfd2ffcd
commit 2d8b3a200e
21 changed files with 328 additions and 87 deletions

View file

@ -4,7 +4,7 @@ pub mod wl_subsurface;
pub mod xdg_surface;
use crate::backend::{KeyState, ScrollAxis, SeatId};
use crate::client::{Client, ClientId, DynEventFormatter, RequestParser};
use crate::client::{Client, DynEventFormatter, RequestParser};
use crate::fixed::Fixed;
use crate::ifs::wl_buffer::WlBuffer;
use crate::ifs::wl_callback::WlCallback;
@ -17,7 +17,9 @@ use crate::object::{Interface, Object, ObjectId};
use crate::pixman::Region;
use crate::rect::Rect;
use crate::render::Renderer;
use crate::tree::{Node, NodeId};
use crate::tree::{
Node, NodeId,
};
use crate::utils::buffd::{MsgParser, MsgParserError};
use crate::utils::clonecell::CloneCell;
use crate::utils::linkedlist::LinkedList;
@ -662,7 +664,7 @@ impl Node for WlSurface {
renderer.render_surface(self, x, y);
}
fn client_id(&self) -> Option<ClientId> {
Some(self.client.id)
fn client(&self) -> Option<Rc<Client>> {
Some(self.client.clone())
}
}

View file

@ -1,6 +1,6 @@
mod types;
use crate::client::{ClientId, DynEventFormatter};
use crate::client::{Client, DynEventFormatter};
use crate::cursor::KnownCursor;
use crate::fixed::Fixed;
use crate::ifs::wl_seat::{NodeSeatState, WlSeatGlobal};
@ -311,8 +311,8 @@ impl Node for XdgPopup {
self.xdg.set_workspace(ws);
}
fn client_id(&self) -> Option<ClientId> {
Some(self.xdg.surface.client.id)
fn client(&self) -> Option<Rc<Client>> {
Some(self.xdg.surface.client.clone())
}
}

View file

@ -2,7 +2,7 @@ mod types;
use crate::backend::SeatId;
use crate::bugs::Bugs;
use crate::client::{ClientId, DynEventFormatter};
use crate::client::{Client, DynEventFormatter};
use crate::cursor::KnownCursor;
use crate::fixed::Fixed;
use crate::ifs::wl_seat::{NodeSeatState, WlSeatGlobal};
@ -496,8 +496,8 @@ impl Node for XdgToplevel {
self.xdg.set_workspace(ws);
}
fn client_id(&self) -> Option<ClientId> {
Some(self.xdg.surface.client.id)
fn client(&self) -> Option<Rc<Client>> {
Some(self.xdg.surface.client.clone())
}
}

View file

@ -219,7 +219,7 @@ pub(super) struct SetTitle<'a> {
impl<'a> RequestParser<'a> for SetTitle<'a> {
fn parse(parser: &mut MsgParser<'_, 'a>) -> Result<Self, MsgParserError> {
Ok(Self {
title: parser.string()?,
title: parser.bstr()?,
})
}
}
@ -235,7 +235,7 @@ pub(super) struct SetAppId<'a> {
impl<'a> RequestParser<'a> for SetAppId<'a> {
fn parse(parser: &mut MsgParser<'_, 'a>) -> Result<Self, MsgParserError> {
Ok(Self {
app_id: parser.string()?,
app_id: parser.bstr()?,
})
}
}