Egon Elbre pointed out that a difference of 20 means a 10% difference.
Lowering the tolerance to 5 didn't work on my setup; leave it at 10.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Implement key state for the following platforms:
js, wayland, windows, x11.
Unsupported platforms will continue to function as before, sending
key.Press for all key events.
Signed-off-by: Josiah Niedrauer <josiah@niedrauer.com>
The Window creates the context, and should also be responsible for
destroying it.
As a bonus, the wrong release ordering of loop.renderLoop is fixed.
Before this change, the context would be destroyed before the renderer
got a chance to destroy its resources.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
First, don't filter on HWND in GetMessage and PeekMessage, lest
thread-specific messages may get lost. See
https://devblogs.microsoft.com/oldnewthing/20050209-00/?p=36493
Second, replace the dead status with the detection of WM_QUIT; it's
what it's there for.
May update gio#168
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The python package is gone, we may not need it and/or Debian installs
python3 by default.
curl is needed for automatically applying patches from the mailing list.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The Fairphone 2 only supports OpenGL ES 2.0, but otherwise seems
capable of running Gio. By lowering the minimum requirement, Gio apps
will be available in the Play Store for Fairphone 2 devices.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Added comment on the use of Dimension.Baseline and Direction.Layout constraint minimum clearing.
Also, renamed the Direction receiver for consistency and removed unnecessary conversions.
Signed-off-by: Pierre.Curto <pierre.curto@gmail.com>
Package material's ad-hoc mulAlpha didn't take the sRGB color-space
into account, which meant that alpha-scaled colors were subtly wrong.
Introduce f32color.MulAlpha and convert all uses to it.
Thanks to René Post for finding and debugging the issue.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Wayland doesn't guarantee the presence of server-side window decorations
(border, close/maximize/minimize buttons), and Gio doesn't have client-side
decorations either (issue #29). The issue is more than a year old, so it's time
to default to X11 to have a good out-of-the-box experience on unix systems.
Updates gio#29
Signed-off-by: Elias Naur <mail@eliasnaur.com>
32-bit property values are transferred with the C type "long", which
may be 64 bit.
Fixes "invalid atoms" errors from Firefox and Gedit.
While here, add additional clipboard formats to please Gedit.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
When modifier keys are active DispatchKey should not send a
key.EditEvent for the key that was pressed. For example when pressing
Ctrl+Alt+e DispatchEvent should not generate a key.EditEvent{Text:"e"}.
Signed-off-by: aarzilli <alessandro.arzilli@gmail.com>
On my setup:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) HD Graphics 530 (SKL GT2) (0x1912)
Version: 20.1.5
Accelerated: yes
Video memory: 3072MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
eglCreateWindowSurface with the sRGB flag fails with EGL_BAD_MATCH.
Bumping the ALPHA_SIZE from 1 to 8 seems to make the driver happy
again.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Before users were limited to only use a appicon.png in the root directory.
Now the user is free to use any png anywhere on the system with the help of the -icon flag.
Signed-off-by: Axel Paulander <axel.paulander@gmail.com>
Go 1.15 is out so let's bump the version to 1.14 to sidestep the annoying
webassembly syscall/js change from Go 1.13.
Go 1.13 (and warlier?) will still attempt to build, but when failing to
build a webassembly program the go tool will report the version mismatch.
Fixes gio#156
Signed-off-by: Elias Naur <mail@eliasnaur.com>
An event reporting the most recent Android View attached to the Window is both
simpler to implement and automatically tracks the Activity lifecycle.
The downside is that buggy programs may hold on to a stale references.
Fortunately, JNI references are handles not pointers so the always-on Android
JNI checks will very likely catch stale references on use.
Signed-off-by: Elias Naur <mail@eliasnaur.com>