refactor: use cctk

This commit is contained in:
Ashley Wulber 2024-11-23 02:02:52 -05:00
parent 1b8a399ebd
commit 6e91eabf4c
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
46 changed files with 224 additions and 183 deletions

View file

@ -2,7 +2,7 @@ use crate::platform_specific::wayland::{
event_loop::state::SctkState,
sctk_event::{LayerSurfaceEventVariant, SctkEvent},
};
use sctk::{
use cctk::sctk::{
delegate_layer,
reexports::client::Proxy,
shell::{
@ -16,9 +16,9 @@ use winit::dpi::LogicalSize;
impl LayerShellHandler for SctkState {
fn closed(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
layer: &sctk::shell::wlr_layer::LayerSurface,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
layer: &cctk::sctk::shell::wlr_layer::LayerSurface,
) {
let layer = match self.layer_surfaces.iter().position(|s| {
s.surface.wl_surface().id() == layer.wl_surface().id()
@ -36,10 +36,10 @@ impl LayerShellHandler for SctkState {
fn configure(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
layer: &sctk::shell::wlr_layer::LayerSurface,
mut configure: sctk::shell::wlr_layer::LayerSurfaceConfigure,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
layer: &cctk::sctk::shell::wlr_layer::LayerSurface,
mut configure: cctk::sctk::shell::wlr_layer::LayerSurfaceConfigure,
_serial: u32,
) {
self.request_redraw(layer.wl_surface());

View file

@ -2,7 +2,7 @@ use crate::platform_specific::wayland::{
event_loop::state::{self, PopupParent, SctkState},
sctk_event::{PopupEventVariant, SctkEvent},
};
use sctk::{
use cctk::sctk::{
delegate_xdg_popup, reexports::client::Proxy,
shell::xdg::popup::PopupHandler,
};
@ -10,10 +10,10 @@ use sctk::{
impl PopupHandler for SctkState {
fn configure(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
popup: &sctk::shell::xdg::popup::Popup,
configure: sctk::shell::xdg::popup::PopupConfigure,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
popup: &cctk::sctk::shell::xdg::popup::Popup,
configure: cctk::sctk::shell::xdg::popup::PopupConfigure,
) {
self.request_redraw(popup.wl_surface());
let sctk_popup = match self.popups.iter_mut().find(|s| {
@ -43,9 +43,9 @@ impl PopupHandler for SctkState {
fn done(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
popup: &sctk::shell::xdg::popup::Popup,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
popup: &cctk::sctk::shell::xdg::popup::Popup,
) {
let sctk_popup = match self.popups.iter().position(|s| {
s.popup.wl_surface().clone() == popup.wl_surface().clone()

View file

@ -1,23 +1,23 @@
use crate::platform_specific::wayland::event_loop::state::SctkState;
use sctk::{
use cctk::sctk::{
delegate_xdg_shell, delegate_xdg_window, shell::xdg::window::WindowHandler,
};
impl WindowHandler for SctkState {
fn request_close(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
_window: &sctk::shell::xdg::window::Window,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
_window: &cctk::sctk::shell::xdg::window::Window,
) {
}
fn configure(
&mut self,
_conn: &sctk::reexports::client::Connection,
_qh: &sctk::reexports::client::QueueHandle<Self>,
_window: &sctk::shell::xdg::window::Window,
_configure: sctk::shell::xdg::window::WindowConfigure,
_conn: &cctk::sctk::reexports::client::Connection,
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
_window: &cctk::sctk::shell::xdg::window::Window,
_configure: cctk::sctk::shell::xdg::window::WindowConfigure,
_serial: u32,
) {
}