wip: corner radius v2
This commit is contained in:
parent
9f41055861
commit
1bcba7e30c
7 changed files with 137 additions and 65 deletions
|
|
@ -1,17 +1,29 @@
|
|||
use cctk::{sctk, cosmic_protocols::{
|
||||
corner_radius::v1::client::{
|
||||
use cctk::{
|
||||
cosmic_protocols::corner_radius::v1::client::{
|
||||
cosmic_corner_radius_layer_v1::CosmicCornerRadiusLayerV1,
|
||||
cosmic_corner_radius_manager_v1::CosmicCornerRadiusManagerV1,
|
||||
cosmic_corner_radius_toplevel_v1::CosmicCornerRadiusToplevelV1,
|
||||
},
|
||||
overlap_notify::v1::client::zcosmic_overlap_notification_v1::ZcosmicOverlapNotificationV1,
|
||||
}};
|
||||
use sctk::reexports::{
|
||||
client::{Connection, Dispatch, Proxy},
|
||||
|
||||
sctk,
|
||||
};
|
||||
use sctk::reexports::client::{Connection, Dispatch, Proxy};
|
||||
|
||||
use crate::event_loop::state::SctkState;
|
||||
use crate::platform_specific::wayland::SctkEvent;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum CornerRadiusWrapper {
|
||||
Xdg(CosmicCornerRadiusToplevelV1),
|
||||
Wlr(CosmicCornerRadiusLayerV1),
|
||||
}
|
||||
|
||||
impl Drop for CornerRadiusWrapper {
|
||||
fn drop(&mut self) {
|
||||
match self {
|
||||
Self::Xdg(c) => c.destroy(),
|
||||
Self::Wlr(c) => c.destroy(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl Dispatch<CosmicCornerRadiusManagerV1, ()> for SctkState {
|
||||
fn event(
|
||||
|
|
@ -21,15 +33,11 @@ impl Dispatch<CosmicCornerRadiusManagerV1, ()> for SctkState {
|
|||
_data: &(),
|
||||
_conn: &Connection,
|
||||
_qhandle: &sctk::reexports::client::QueueHandle<Self>,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
impl
|
||||
Dispatch<
|
||||
CosmicCornerRadiusToplevelV1,
|
||||
(),
|
||||
> for SctkState
|
||||
{
|
||||
impl Dispatch<CosmicCornerRadiusToplevelV1, ()> for SctkState {
|
||||
fn event(
|
||||
state: &mut Self,
|
||||
_proxy: &CosmicCornerRadiusToplevelV1,
|
||||
|
|
@ -39,7 +47,22 @@ impl
|
|||
_qhandle: &sctk::reexports::client::QueueHandle<Self>,
|
||||
) {
|
||||
match event {
|
||||
_ => unimplemented!()
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Dispatch<CosmicCornerRadiusLayerV1, ()> for SctkState {
|
||||
fn event(
|
||||
state: &mut Self,
|
||||
_proxy: &CosmicCornerRadiusLayerV1,
|
||||
event: <CosmicCornerRadiusLayerV1 as Proxy>::Event,
|
||||
_data: &(),
|
||||
_conn: &Connection,
|
||||
_qhandle: &sctk::reexports::client::QueueHandle<Self>,
|
||||
) {
|
||||
match event {
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue