mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app: [API] refactor app.ViewEvent to support wayland
This commit changes the definition of app.ViewEvent on Unix systems to be an interface implemented by two different concrete types: X11ViewEvent and WaylandViewEvent. Each provides the necessary fields for custom rendering on its display protocol. This is a breaking change for all users of app.ViewEvent on Linux/BSD, as it now is an interface instead of a concrete type. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
+2
-2
@@ -813,10 +813,10 @@ func newX11Window(gioWin *callbacks, options []Option) error {
|
||||
// make the window visible on the screen
|
||||
C.XMapWindow(dpy, win)
|
||||
w.Configure(options)
|
||||
w.w.Event(ViewEvent{Display: unsafe.Pointer(dpy), Window: uintptr(win)})
|
||||
w.w.Event(X11ViewEvent{Display: unsafe.Pointer(dpy), Window: uintptr(win)})
|
||||
w.setStage(system.StageRunning)
|
||||
w.loop()
|
||||
w.w.Event(ViewEvent{})
|
||||
w.w.Event(X11ViewEvent{})
|
||||
w.destroy()
|
||||
}()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user