<CAL+h_7OXxKaoEt+t4eP8sRnEwynYcQQyrB6rc_XzFN53ib0+xg@mail.gmail.com>
'''func main() { go func() { w := new(app.Window) w.Option(app.Size(unit.Dp(800), unit.Dp(600)), app.Decorated(false)) if err := loop(w); err != nil { panic(err) } os.Exit(0) }() app.Main() } ''' system: ubuntu 22.04 gio v 0.7.1 Hello, I would like to ask a question, that is, app.Decorated(false) has been set to flase, but the default border and title bar of the gio program's window still exist. Can you tell me the reason? Thank you.
<CAFcc3FSvy2yUxCJHU7FJyq2RJJkCGzb+-dctgQPFhpfznyKXjg@mail.gmail.com>
<CAL+h_7OXxKaoEt+t4eP8sRnEwynYcQQyrB6rc_XzFN53ib0+xg@mail.gmail.com>
(view parent)
On Fri, Aug 9, 2024 at 12:53 AM zi nan <kainan20021110@gmail.com> wrote: > > '''func main() { > go func() { > w := new(app.Window) > w.Option(app.Size(unit.Dp(800), unit.Dp(600)), > app.Decorated(false)) > if err := loop(w); err != nil { > panic(err) > } > os.Exit(0) > }() > app.Main() > } > ''' > system: ubuntu 22.04 > gio v 0.7.1 > Hello, I would like to ask a question, that is, app.Decorated(false) > has been set to flase, but the default border and title bar of the gio > program's window still exist. Can you tell me the reason? Thank you. Gio can't disable the system decorations in all environments. I think you're probably on X11, and I don't think it's supported there. You can determine whether the decorations are enabled by looking at the first `app.ConfigEvent` you received. Cheers, Chris
<1ea2f357-9d54-4151-81ca-faca58fbd857@app.fastmail.com>
<CAFcc3FSvy2yUxCJHU7FJyq2RJJkCGzb+-dctgQPFhpfznyKXjg@mail.gmail.com>
(view parent)
From what I can tell, to get rid of decorations on X11, we just need to set `_MOTIF_WM_HINTS` and it will work in most cases. https://github.com/glfw/glfw/blob/21fea01161e0d6b70c0c5c1f52dc8e7a7df14a50/src/x11_window.c#L2624-L2644 GLFW used to have special cases for Gnome, KDE and others, but in their latest code, they only deal with that single property. Cheers, Walter S.
<CAFcc3FRTvYPo4Dgsod8ESgj9RH9wb9_WA7iU7M7xg=NNVKc3kw@mail.gmail.com>
<1ea2f357-9d54-4151-81ca-faca58fbd857@app.fastmail.com>
(view parent)
> >From what I can tell, to get rid of decorations on X11, we just need to set `_MOTIF_WM_HINTS` and it will work in most cases. > > https://github.com/glfw/glfw/blob/21fea01161e0d6b70c0c5c1f52dc8e7a7df14a50/src/x11_window.c#L2624-L2644 > > GLFW used to have special cases for Gnome, KDE and others, but in their latest code, they only deal with that single property. We'd happily accept a patch for this if you'd like to make one.