mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app/internal/window: x11 driver
This driver still lacks fling support and dp/sp configuration. By default, linux builds will try to use the Wayland driver then fallback to X11 if it fails. Drivers can be disabled by using either the nowayland or nox11 build tags. Signed-off-by: Denis Bernard <db047h@gmail.com>
This commit is contained in:
committed by
Elias Naur
parent
ec672ca06a
commit
547ff2e484
@@ -0,0 +1,25 @@
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
// +build linux,!android,!nox11
|
||||
|
||||
package window
|
||||
|
||||
import "gioui.org/app/internal/gl"
|
||||
|
||||
func (w *x11Window) NewContext() (gl.Context, error) {
|
||||
return newContext(w)
|
||||
}
|
||||
|
||||
func (w *x11Window) eglDestroy() {
|
||||
w.destroy()
|
||||
}
|
||||
|
||||
func (w *x11Window) eglDisplay() _EGLNativeDisplayType {
|
||||
return _EGLNativeDisplayType(w.display())
|
||||
}
|
||||
|
||||
func (w *x11Window) eglWindow(visID int) (_EGLNativeWindowType, int, int, error) {
|
||||
return _EGLNativeWindowType(uintptr(w.xw)), w.width, w.height, nil
|
||||
}
|
||||
|
||||
func (w *x11Window) needVSync() bool { return true }
|
||||
Reference in New Issue
Block a user