@@ -30,7 +30,7 @@ use crate::{
3030} ;
3131use cctk:: {
3232 cosmic_protocols:: overlap_notify:: v1:: client:: zcosmic_overlap_notification_v1:: ZcosmicOverlapNotificationV1 ,
33- wayland_client:: Connection ,
33+ sctk :: shell :: wlr_layer :: Layer , wayland_client:: Connection ,
3434} ;
3535
3636use cosmic:: iced:: id;
@@ -89,6 +89,7 @@ use wayland_protocols::{
8989 } ,
9090 xdg:: shell:: client:: xdg_positioner:: ConstraintAdjustment ,
9191} ;
92+ use wayland_protocols_wlr:: layer_shell:: v1:: client:: zwlr_layer_shell_v1;
9293
9394use cosmic_panel_config:: { CosmicPanelBackground , CosmicPanelConfig , PanelAnchor } ;
9495
@@ -1027,6 +1028,8 @@ impl PanelSpace {
10271028 return ;
10281029 } ;
10291030
1031+ // XXX only change if autohide?
1032+
10301033 if self . shared . workspaces_shown . get ( ) {
10311034 self . transitioning = true ;
10321035 self . is_dirty = true ;
@@ -1047,8 +1050,20 @@ impl PanelSpace {
10471050 self . additional_gap ,
10481051 layer_surface,
10491052 ) ;
1053+
1054+ layer_surface. set_layer ( Layer :: Overlay ) ;
10501055 } else {
10511056 eprintln ! ( "hidden" ) ;
1057+ let layer = match self . config ( ) . layer ( ) {
1058+ zwlr_layer_shell_v1:: Layer :: Background => Layer :: Background ,
1059+ zwlr_layer_shell_v1:: Layer :: Bottom => Layer :: Bottom ,
1060+ zwlr_layer_shell_v1:: Layer :: Top => Layer :: Top ,
1061+ zwlr_layer_shell_v1:: Layer :: Overlay => Layer :: Overlay ,
1062+ _ => {
1063+ return ;
1064+ } ,
1065+ } ;
1066+ layer_surface. set_layer ( layer) ;
10521067 self . handle_focus ( ) ;
10531068 }
10541069 }
0 commit comments