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-shell
|
||||||
- xdg_positioner
|
- xdg_positioner
|
||||||
- set_reactive
|
- set_reactive
|
||||||
- xdg_toplevel
|
- xdg_popup
|
||||||
- set_fullscreen
|
- grab
|
||||||
- unset_fullscreen
|
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,7 @@ impl XdgToplevel {
|
||||||
) -> Result<(), SetFullscreenError> {
|
) -> Result<(), SetFullscreenError> {
|
||||||
let client = &self.xdg.surface.client;
|
let client = &self.xdg.surface.client;
|
||||||
let req: SetFullscreen = client.parse(self.deref(), parser)?;
|
let req: SetFullscreen = client.parse(self.deref(), parser)?;
|
||||||
|
self.states.borrow_mut().insert(STATE_FULLSCREEN);
|
||||||
'set_fullscreen: {
|
'set_fullscreen: {
|
||||||
let output = if req.output.is_some() {
|
let output = if req.output.is_some() {
|
||||||
match client.lookup(req.output)?.global.node.get() {
|
match client.lookup(req.output)?.global.node.get() {
|
||||||
|
|
@ -636,7 +637,7 @@ impl XdgSurfaceExt for XdgToplevel {
|
||||||
|
|
||||||
impl SizedFullscreenNode for XdgToplevel {
|
impl SizedFullscreenNode for XdgToplevel {
|
||||||
fn on_set_fullscreen(&self, _workspace: &Rc<WorkspaceNode>) {
|
fn on_set_fullscreen(&self, _workspace: &Rc<WorkspaceNode>) {
|
||||||
self.states.borrow_mut().insert(STATE_FULLSCREEN);
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_unset_fullscreen(&self) {
|
fn on_unset_fullscreen(&self) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ pub struct ZwpIdleInhibitorV1 {
|
||||||
|
|
||||||
impl ZwpIdleInhibitorV1 {
|
impl ZwpIdleInhibitorV1 {
|
||||||
fn destroy(&self, parser: MsgParser<'_, '_>) -> Result<(), ZwpIdleInhibitorV1Error> {
|
fn destroy(&self, parser: MsgParser<'_, '_>) -> Result<(), ZwpIdleInhibitorV1Error> {
|
||||||
log::info!("destroy {}", self.id);
|
|
||||||
let _req: Destroy = self.client.parse(self, parser)?;
|
let _req: Destroy = self.client.parse(self, parser)?;
|
||||||
self.client.remove_obj(self)?;
|
self.client.remove_obj(self)?;
|
||||||
if self.surface.idle_inhibitors.remove(&self.id).is_some() {
|
if self.surface.idle_inhibitors.remove(&self.id).is_some() {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,6 @@ impl ZwpIdleInhibitManagerV1 {
|
||||||
) -> Result<(), ZwpIdleInhibitManagerV1Error> {
|
) -> Result<(), ZwpIdleInhibitManagerV1Error> {
|
||||||
let req: CreateInhibitor = self.client.parse(self, parser)?;
|
let req: CreateInhibitor = self.client.parse(self, parser)?;
|
||||||
let surface = self.client.lookup(req.surface)?;
|
let surface = self.client.lookup(req.surface)?;
|
||||||
log::info!("create {}", req.id);
|
|
||||||
let inhibit = Rc::new(ZwpIdleInhibitorV1 {
|
let inhibit = Rc::new(ZwpIdleInhibitorV1 {
|
||||||
id: req.id,
|
id: req.id,
|
||||||
inhibit_id: self.client.state.idle_inhibitor_ids.next(),
|
inhibit_id: self.client.state.idle_inhibitor_ids.next(),
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@ pub enum FindTreeResult {
|
||||||
Other,
|
Other,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl FindTreeResult {
|
||||||
|
pub fn accepts_input(self) -> bool {
|
||||||
|
self == Self::AcceptsInput
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub trait SizedNode: Sized + 'static {
|
pub trait SizedNode: Sized + 'static {
|
||||||
fn id(&self) -> NodeId;
|
fn id(&self) -> NodeId;
|
||||||
fn seat_state(&self) -> &NodeSeatState;
|
fn seat_state(&self) -> &NodeSeatState;
|
||||||
|
|
|
||||||
|
|
@ -342,15 +342,14 @@ impl SizedNode for OutputNode {
|
||||||
return fs.as_node().node_find_tree_at(x, y, tree);
|
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)
|
let res = self.find_layer_surface_at(x, y, &[OVERLAY, TOP], tree);
|
||||||
== FindTreeResult::AcceptsInput
|
if res.accepts_input() {
|
||||||
{
|
return res;
|
||||||
return FindTreeResult::AcceptsInput;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
let (x_abs, y_abs) = self.global.pos.get().translate_inv(x, y);
|
||||||
for stacked in self.state.root.stacked.rev_iter() {
|
for stacked in self.state.root.stacked.rev_iter() {
|
||||||
let ext = stacked.node_absolute_position();
|
let ext = stacked.node_absolute_position();
|
||||||
if stacked.node_absolute_position_constrains_input() && !ext.contains(x_abs, y_abs)
|
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) {
|
async fn set_fullscreen(&self, data: &Rc<XwindowData>, fullscreen: bool) {
|
||||||
data.info.fullscreen.set(fullscreen);
|
if false {
|
||||||
self.set_net_wm_state(data).await;
|
// 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]) {
|
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
|
- presentation time
|
||||||
- viewporter
|
- viewporter
|
||||||
- session lock
|
- session lock
|
||||||
|
- stacked restacking
|
||||||
|
|
||||||
# done
|
# done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue