~eliasnaur/gio

app/internal/wm: [X11] ignore zero-sized FrameEvents

Updates gio#235

Signed-off-by: Elias Naur <mail@eliasnaur.com>
op/paint: skip zero images

Updates gio#235

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/wm: [macOS] close display link after window close

The app.Window owner may run SetAnimating just before window close,
which in turn rely on an active display link. This change makes sure
the link is stopped after window close where no more driver calls
can occur.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/wm: [macOS] make app emnu responsive on launch

The macOS app menu would respond to clicks, only to shotcuts (Cmd-Q,
Cmd-H). Moving setActivationPolicy to applicationDidFinishLaunching
seems to fix that, although I can't explain why.

Move a SetDriver call after initialization while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/wm: reformat os_macos.m

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app,app/internal/wm: [macOS] refresh context on display change

The NSViewGlobalFrameDidChangeNotification notification is documented to
be fired every time [NSOpenGLContext update] needs to be called.
However, the notification fails to fire on my setup when a window is
moved to a display with a different pixel scale, which leads to
incorrectly sized output.

This change gets rid of the notification and updates the context before
every frame.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu/internal/opengl: restore BeginFrame state in EndFrame

To ease the integration with foreign OpenGL contexts, carefully save the
context state before rendering a frame and restore it afterwards. Gio
rendering can then be mixed with OpenGL code that expects exclusive
control over context state.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu/headless: remove macOS context preparation no longer necessary

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/wm: [android] fix key.Event and key.EditEvent conflict

Fixes gio#224

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
app/internal/wm: [android] add Fullscreen support

Now, it's possible to use `app.Fullscreen` on Android devices. It uses
the "Fullscreen Sticky Immersive" mode.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
cmd/gogio: [wasm] add favicon and title support

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
internal/wm: [wasm] add Title support

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
internal/stroke, op/clip: remove unused variables

Fixes gio#233

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
widget: add key.InputHint to widget.Editor

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
app/internal/wm: [Android] set up view handle before callbacks

Fixes gio#230 (again)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app, io: [wasm, android] add support for numeric/email keyboard mode

Previously, the on-screen keyboard always displays the text keyboard,
(QWERTY or equivalent).

For optimal user experience, it's possible to specify the keyboard type
using `InputHint`. The on-screen keyboard will provide shortcuts or
restrict what the user can input.

Due to some limitations (gio#116), only numeric and text keyboards are
supported on Android.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
app: don't run driver functions if there's no driver

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: avoid race condition on the underlying driver

Instead of a single racy window.driver field, maintain a driver
reference for each goroutine that needs it: the window.run event loop
and the callbacks structure.

Fixes gio#230

Signed-off-by: Elias Naur <mail@eliasnaur.com>
internal/gl: fix WebGL 1 support

Fixes gio#231

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
gpu/internal/opengl,app/internal/wm: generalize desktop OpenGL support

This changes moves the macOS specific setup for desktop OpenGL to the
portable opengl package. The opengl package already takes care of the
desktop OpenGL setup for sRGB framebuffers, and by moving the code we
avoid calling the wrong OpenGL functions in case both OpenGL.framework
and ANGLE libGLESv2.dylib is linked into the program.

Remove the interface casting expressions for gl.Functions; it wasn't
worth the trouble to keep updated.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
Next