Skip to content

client-toolkit/toplevel-info: Work with only ext foreign toplevel #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions client-toolkit/examples/toplevel-monitor.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cosmic_client_toolkit::toplevel_info::{ToplevelInfoHandler, ToplevelInfoState};
use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1;
use sctk::{
output::{OutputHandler, OutputState},
registry::{ProvidesRegistryState, RegistryState},
};
use wayland_client::{globals::registry_queue_init, protocol::wl_output, Connection, QueueHandle};
use wayland_protocols::ext::foreign_toplevel_list::v1::client::ext_foreign_toplevel_handle_v1;

struct AppData {
output_state: OutputState,
Expand All @@ -30,7 +30,7 @@ impl OutputHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
_output: wl_output::WlOutput,
) {
}

Expand All @@ -46,7 +46,7 @@ impl OutputHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
_output: wl_output::WlOutput,
) {
}
}
Expand All @@ -60,7 +60,7 @@ impl ToplevelInfoHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
toplevel: &ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
) {
println!(
"New toplevel: {:?}",
Expand All @@ -72,7 +72,7 @@ impl ToplevelInfoHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
toplevel: &ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
) {
println!(
"Update toplevel: {:?}",
Expand All @@ -84,15 +84,15 @@ impl ToplevelInfoHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
toplevel: &ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
) {
println!(
"Closed toplevel: {:?}",
self.toplevel_info_state.info(toplevel).unwrap()
);
}

fn info_done(&mut self, conn: &Connection, qh: &QueueHandle<Self>) {
fn info_done(&mut self, _conn: &Connection, _qh: &QueueHandle<Self>) {
println!("Info done");
}
}
Expand Down
4 changes: 2 additions & 2 deletions client-toolkit/examples/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl OutputHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
_output: wl_output::WlOutput,
) {
}

Expand All @@ -45,7 +45,7 @@ impl OutputHandler for AppData {
&mut self,
_conn: &Connection,
_qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
_output: wl_output::WlOutput,
) {
}
}
Expand Down
Loading
Loading