Added untested support for OverrideRedirect windows

This commit is contained in:
Sasha Koshka 2023-04-10 16:22:47 -04:00
parent aed448671b
commit da47026d1c
2 changed files with 55 additions and 7 deletions

View File

@ -16,6 +16,7 @@ import "git.tebibyte.media/sashakoshka/tomo/canvas"
// import "runtime/debug" // import "runtime/debug"
type mainWindow struct { *window } type mainWindow struct { *window }
type menuWindow struct { *window }
type window struct { type window struct {
backend *Backend backend *Backend
xWindow *xwindow.Window xWindow *xwindow.Window
@ -48,13 +49,14 @@ func (backend *Backend) NewWindow (
err error, err error,
) { ) {
if backend == nil { panic("nil backend") } if backend == nil { panic("nil backend") }
window, err := backend.newWindow(bounds) window, err := backend.newWindow(bounds, false)
output = mainWindow { window } output = mainWindow { window }
return output, err return output, err
} }
func (backend *Backend) newWindow ( func (backend *Backend) newWindow (
bounds image.Rectangle, bounds image.Rectangle,
override bool,
) ( ) (
output *window, output *window,
err error, err error,