Merge pull request #197 from mahkoh/jorth/layer-shell
Implement remaining layer shell features
This commit is contained in:
commit
3c61dd5fd4
45 changed files with 857 additions and 402 deletions
|
|
@ -8,7 +8,7 @@ use {
|
|||
},
|
||||
utils::{
|
||||
bitflags::BitflagsExt, clonecell::CloneCell, copyhashmap::CopyHashMap,
|
||||
errorfmt::ErrorFmt, oserror::OsError,
|
||||
errorfmt::ErrorFmt, hash_map_ext::HashMapExt, oserror::OsError,
|
||||
},
|
||||
video::drm::Drm,
|
||||
wire::{
|
||||
|
|
@ -191,7 +191,7 @@ impl UsrJayRenderCtxOwner for PortalDisplay {
|
|||
impl UsrConOwner for PortalDisplay {
|
||||
fn killed(&self) {
|
||||
log::info!("Removing display {}", self.id);
|
||||
for (_, sc) in self.screencasts.lock().drain() {
|
||||
for sc in self.screencasts.lock().drain_values() {
|
||||
sc.kill();
|
||||
}
|
||||
self.windows.clear();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ use {
|
|||
utils::{
|
||||
clonecell::{CloneCell, UnsafeCellCloneSafe},
|
||||
copyhashmap::CopyHashMap,
|
||||
hash_map_ext::HashMapExt,
|
||||
},
|
||||
video::dmabuf::{DmaBuf, PlaneVec},
|
||||
wire::jay_screencast::Ready,
|
||||
|
|
@ -267,7 +268,7 @@ impl ScreencastSession {
|
|||
ScreencastPhase::Terminated => {}
|
||||
ScreencastPhase::Selecting(s) => {
|
||||
s.core.reply.err("Session has been terminated");
|
||||
for (_, gui) in s.guis.lock().drain() {
|
||||
for gui in s.guis.lock().drain_values() {
|
||||
gui.kill(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use {
|
|||
},
|
||||
},
|
||||
theme::Color,
|
||||
utils::copyhashmap::CopyHashMap,
|
||||
utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt},
|
||||
wl_usr::usr_ifs::{
|
||||
usr_jay_select_toplevel::UsrJaySelectToplevelOwner,
|
||||
usr_jay_select_workspace::UsrJaySelectWorkspaceOwner, usr_jay_toplevel::UsrJayToplevel,
|
||||
|
|
@ -53,7 +53,7 @@ enum ButtonRole {
|
|||
|
||||
impl SelectionGui {
|
||||
pub fn kill(&self, upwards: bool) {
|
||||
for (_, surface) in self.surfaces.lock().drain() {
|
||||
for surface in self.surfaces.lock().drain_values() {
|
||||
surface.overlay.data.kill(false);
|
||||
}
|
||||
if let ScreencastPhase::Selecting(s) = self.screencast_session.phase.get() {
|
||||
|
|
@ -159,7 +159,7 @@ impl ButtonOwner for StaticButton {
|
|||
ScreencastPhase::Selecting(selecting) => selecting,
|
||||
_ => return,
|
||||
};
|
||||
for (_, gui) in selecting.guis.lock().drain() {
|
||||
for gui in selecting.guis.lock().drain_values() {
|
||||
gui.kill(false);
|
||||
}
|
||||
let dpy = &self.surface.output.dpy;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use {
|
|||
theme::Color,
|
||||
utils::{
|
||||
asyncevent::AsyncEvent, clonecell::CloneCell, copyhashmap::CopyHashMap,
|
||||
errorfmt::ErrorFmt, rc_eq::rc_eq,
|
||||
errorfmt::ErrorFmt, hash_map_ext::HashMapExt, rc_eq::rc_eq,
|
||||
},
|
||||
video::gbm::{GbmBo, GBM_BO_USE_RENDERING},
|
||||
wire::{
|
||||
|
|
@ -671,7 +671,7 @@ impl WindowData {
|
|||
owner.kill(upwards);
|
||||
}
|
||||
self.render_task.take();
|
||||
for (_, pb) in self.pending_bufs.lock().drain() {
|
||||
for pb in self.pending_bufs.lock().drain_values() {
|
||||
pb.params.con.remove_obj(pb.params.deref());
|
||||
}
|
||||
for buf in self.bufs.borrow_mut().drain(..) {
|
||||
|
|
@ -689,7 +689,7 @@ impl WindowData {
|
|||
|
||||
pub fn allocate_buffers(self: &Rc<Self>) {
|
||||
{
|
||||
for (_, buf) in self.pending_bufs.lock().drain() {
|
||||
for buf in self.pending_bufs.lock().drain_values() {
|
||||
buf.params.con.remove_obj(buf.params.deref());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue