Skip to content

When maximized, the application's title bar gets hidden behind the system taskbar #1485

@J2ane

Description

@J2ane

Environment:

  • OS: Linux (kernel 6.16.8, x86_64)
  • gpui version: "0.2.2"
  • gpui_component version: "0.3.1"
  • rust version: "rustc 1.91.0 (f8297e351 2025-10-28)"
use gpui::*;
use gpui_component::{button::*, *};

pub struct HelloWorld;

impl Render for HelloWorld {
    fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
        div()
            .v_flex()
            .gap_2()
            .size_full()
            .items_center()
            .justify_center()
            .child("Hello, World")
            .child(
                Button::new("OK")
                    .primary()
                    .label("Let's Go!")
                    .on_click(|_, _, _| println!("Clicked!")),
            )
    }
}


fn main() {
    let app = Application::new();

    app.run(move |cx| {
        gpui_component::init(cx);

        cx.spawn(async move |cx| {
            cx.open_window(WindowOptions::default(), |window, cx| {
                let view = cx.new(|_| HelloWorld);
                cx.new(|cx| Root::new(view.into(), window, cx))
            })?;

            Ok::<_, anyhow::Error>(())
        })
        .detach();
    });
}
  • non-maximized state:
Image
  • maximized state:(The window has minimize, maximize, and close buttons, but they are overlapped by the system taskbar)
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions