Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion app/os_wayland.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ type window struct {
dir f32.Point
}

alreadyDecorated bool
configured bool
lastFrameCallback *C.struct_wl_callback

Expand Down Expand Up @@ -1061,7 +1062,14 @@ func (w *window) Configure(options []Option) {
cnf := w.config
cnf.apply(cfg, options)
w.config.decoHeight = cnf.decoHeight

if w.decor != nil && (prev.Decorated != cnf.Decorated || !w.alreadyDecorated) {
if cnf.Decorated {
C.zxdg_toplevel_decoration_v1_set_mode(w.decor, C.ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE)
} else {
C.zxdg_toplevel_decoration_v1_set_mode(w.decor, C.ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE)
}
w.alreadyDecorated = true
}
switch cnf.Mode {
case Fullscreen:
switch prev.Mode {
Expand Down