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:
Denis Bernard
2019-10-27 13:48:42 +01:00
committed by Elias Naur
parent ec672ca06a
commit 547ff2e484
11 changed files with 670 additions and 19 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build linux,!android
// +build linux,!android,!nowayland
package window
@@ -8,6 +8,8 @@ import (
"errors"
"sync"
"unsafe"
"gioui.org/app/internal/gl"
)
/*
@@ -63,4 +65,8 @@ func (w *window) eglWindow(visID int) (_EGLNativeWindowType, int, int, error) {
return _EGLNativeWindowType(uintptr(unsafe.Pointer(eglWin))), width, height, nil
}
func (w *window) NewContext() (gl.Context, error) {
return newContext(w)
}
func (w *window) needVSync() bool { return false }