Invalidate view when entering/exiting fullscreen

This is required for `render_titlebar` to eventually adapt to
fullscreen status to affect the size of left padding on workspace
name to account for the traffic lights presence/absence

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
ForLoveOfCats 2022-08-09 18:52:25 -04:00
parent 46fef69b1a
commit 43b9f3beb3
2 changed files with 103 additions and 1 deletions

View file

@ -823,6 +823,8 @@ enum FollowerItem {
impl Workspace {
pub fn new(project: ModelHandle<Project>, cx: &mut ViewContext<Self>) -> Self {
cx.observe_fullscreen(|_, _, cx| cx.notify()).detach();
cx.observe_window_activation(Self::on_window_activation_changed)
.detach();
cx.observe(&project, |_, _, cx| cx.notify()).detach();