mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/wm: implement ViewEvent for X11
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
@@ -7,9 +7,15 @@ package wm
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type ViewEvent struct{}
|
||||
type ViewEvent struct {
|
||||
// Display is a pointer to the X11 Display created by XOpenDisplay.
|
||||
Display unsafe.Pointer
|
||||
// Window is the X11 window ID as returned by XCreateWindow.
|
||||
Window uintptr
|
||||
}
|
||||
|
||||
func Main() {
|
||||
select {}
|
||||
|
||||
@@ -690,8 +690,10 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
|
||||
|
||||
go func() {
|
||||
w.w.SetDriver(w)
|
||||
w.w.Event(ViewEvent{Display: unsafe.Pointer(dpy), Window: uintptr(win)})
|
||||
w.setStage(system.StageRunning)
|
||||
w.loop()
|
||||
w.w.Event(ViewEvent{})
|
||||
w.destroy()
|
||||
}()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user