revert X Property change, and cleanup formatting
This commit is contained in:
parent
5a4a802751
commit
65f43a9300
32 changed files with 459 additions and 429 deletions
|
|
@ -1,31 +1,34 @@
|
|||
mod dock_item;
|
||||
mod dock_object;
|
||||
mod utils;
|
||||
mod window;
|
||||
use std::collections::BTreeMap;
|
||||
use std::time::Duration;
|
||||
|
||||
use self::dock_object::DockObject;
|
||||
use self::window::Window;
|
||||
use crate::utils::BoxedWindowList;
|
||||
use futures::executor::block_on;
|
||||
use gdk4::Display;
|
||||
use gio::DesktopAppInfo;
|
||||
use gtk::gio;
|
||||
use gtk::glib;
|
||||
use gtk::prelude::*;
|
||||
use gtk::Application;
|
||||
use gtk4 as gtk;
|
||||
use gtk4::CssProvider;
|
||||
use gtk4::StyleContext;
|
||||
use gtk::Application;
|
||||
use gtk::gio;
|
||||
use gtk::glib;
|
||||
use gtk::prelude::*;
|
||||
use once_cell::sync::OnceCell;
|
||||
use postage::mpsc::Sender;
|
||||
use postage::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::BTreeMap;
|
||||
use std::time::Duration;
|
||||
use x11rb::rust_connection::RustConnection;
|
||||
use zbus::Connection;
|
||||
use zvariant_derive::Type;
|
||||
|
||||
use crate::utils::BoxedWindowList;
|
||||
|
||||
use self::dock_object::DockObject;
|
||||
use self::window::Window;
|
||||
|
||||
mod dock_item;
|
||||
mod dock_object;
|
||||
mod utils;
|
||||
mod window;
|
||||
|
||||
const DEST: &str = "com.System76.PopShell";
|
||||
const PATH: &str = "/com/System76/PopShell";
|
||||
const NUM_LAUNCHER_ITEMS: u8 = 10;
|
||||
|
|
@ -129,7 +132,7 @@ fn main() {
|
|||
match event {
|
||||
Event::Activate(e) => {
|
||||
let _activate_window = zbus_conn
|
||||
.call_method(Some(DEST), PATH, Some(DEST), "WindowFocus", &((e,)))
|
||||
.call_method(Some(DEST), PATH, Some(DEST), "WindowFocus", &((e, )))
|
||||
.await
|
||||
.expect("Failed to focus selected window");
|
||||
}
|
||||
|
|
@ -223,16 +226,16 @@ fn main() {
|
|||
// skip if equal
|
||||
if cached_results.len() == results.len()
|
||||
&& results.iter().zip(cached_results.iter()).fold(
|
||||
0,
|
||||
|acc, z: (&Item, &Item)| {
|
||||
let (a, b) = z;
|
||||
if a.name == b.name {
|
||||
acc + 1
|
||||
} else {
|
||||
acc
|
||||
}
|
||||
},
|
||||
) == cached_results.len()
|
||||
0,
|
||||
|acc, z: (&Item, &Item)| {
|
||||
let (a, b) = z;
|
||||
if a.name == b.name {
|
||||
acc + 1
|
||||
} else {
|
||||
acc
|
||||
}
|
||||
},
|
||||
) == cached_results.len()
|
||||
{
|
||||
continue; // skip this update
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue