wayland: implement xdg-toplevel-drag
This commit is contained in:
parent
e665a18242
commit
364872258a
21 changed files with 535 additions and 70 deletions
|
|
@ -17,7 +17,7 @@ use {
|
|||
leaks::Tracker,
|
||||
object::Object,
|
||||
rect::Rect,
|
||||
tree::{FindTreeResult, FoundNode, WorkspaceNode},
|
||||
tree::{FindTreeResult, FoundNode, OutputNode, WorkspaceNode},
|
||||
utils::{
|
||||
buffd::{MsgParser, MsgParserError},
|
||||
clonecell::CloneCell,
|
||||
|
|
@ -131,6 +131,14 @@ impl XdgSurface {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_output(&self, output: &Rc<OutputNode>) {
|
||||
self.surface.set_output(output);
|
||||
let pu = self.popups.lock();
|
||||
for pu in pu.values() {
|
||||
pu.xdg.set_output(output);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_role(&self, role: XdgSurfaceRole) -> Result<(), XdgSurfaceError> {
|
||||
use XdgSurfaceRole::*;
|
||||
match (self.role.get(), role) {
|
||||
|
|
@ -157,6 +165,15 @@ impl XdgSurface {
|
|||
}
|
||||
}
|
||||
|
||||
fn detach_node(&self) {
|
||||
self.workspace.set(None);
|
||||
self.surface.detach_node();
|
||||
let popups = self.popups.lock();
|
||||
for popup in popups.values() {
|
||||
popup.detach_node();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn geometry(&self) -> Option<Rect> {
|
||||
self.geometry.get()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue