fix: popups occasionally getting jumbled with multiple bars

This commit is contained in:
Jake Stanger
2023-05-29 14:01:42 +01:00
parent e036ff03c1
commit a5ecb363fd
5 changed files with 17 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
use super::manager::ToplevelManagerState;
use crate::lock;
use crate::unique_id::get_unique_usize;
use std::collections::HashSet;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
use tracing::trace;
use wayland_client::protocol::wl_output::WlOutput;
@@ -11,12 +11,6 @@ use wayland_protocols_wlr::foreign_toplevel::v1::client::zwlr_foreign_toplevel_h
Event, ZwlrForeignToplevelHandleV1,
};
static COUNTER: AtomicUsize = AtomicUsize::new(1);
fn get_id() -> usize {
COUNTER.fetch_add(1, Ordering::Relaxed)
}
#[derive(Debug, Clone)]
pub struct ToplevelHandle {
pub handle: ZwlrForeignToplevelHandleV1,
@@ -74,7 +68,7 @@ pub struct ToplevelInfo {
impl Default for ToplevelInfo {
fn default() -> Self {
Self {
id: get_id(),
id: get_unique_usize(),
app_id: String::new(),
title: String::new(),
fullscreen: false,