1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00
Commit Graph

3750 Commits

Author SHA1 Message Date
Emmanuel Gil Peyrot f67b610dd4 Wayland: Handle repeats which missed a timer 2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot 608f055c72 Wayland: Open the timerfd with cloexec 2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot 84d10b32c3 Wayland: Ask xkbcommon whether to repeat a key 2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot 8bc0c5c2c0 Wayland: dlsym() xkb_keymap_key_repeats 2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot 97bf16e5b6 Wayland: Check for wayland protocol version
wl_keyboard version 4 is more recent than the libwayland available in
Ubuntu 14.04.
2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot 90f5edc0b8 Wayland: Use a timerfd for key repeat 2018-02-24 21:06:25 +01:00
Emmanuel Gil Peyrot c14a35e21e Wayland: Obtain keyboard repeat_info
This had to bump the seat version, we now may get the seat name but we
don’t do anything with it.
2018-02-24 21:06:25 +01:00
Camilla Löwy f4cd470bcb Move to modern mappings database with modifiers 2018-02-13 18:57:56 +01:00
Camilla Löwy 3c9011030f Cleanup 2018-02-13 18:33:31 +01:00
Camilla Löwy 2040309d0c Add support for gamepad mapping input modifiers
This adds support for the + and - and ~ input modifiers for joystick
axes.  It also changes how joystick axes are translated to buttons to
more closely match SDL 2.0.7.

Output modifiers are still not supported but have not yet been seen in
the wild.
2018-02-13 18:30:07 +01:00
Camilla Löwy 58cc4b2c5c Move full screen cursor centering to shared code 2018-02-07 16:47:00 +01:00
Camilla Löwy b020467192 Documentation work 2018-02-07 16:46:59 +01:00
Camilla Löwy d10463ac91 Win32: Fix extra resize event during mode switch
The switch to full screen is now done with a single call to
SetWindowPos.
2018-02-07 16:46:59 +01:00
Camilla Löwy cfb5cb8805 Add comment 2018-02-07 16:46:58 +01:00
Camilla Löwy 1d75b205cb Cleanup
Allow window creation despite video mode setting failure.

Video mode setting failure is ignored the rest of the time and the
desired video mode has never been a hard constraint anyway.
2018-02-07 16:46:58 +01:00
Ahmad Fatoum f940a97500 Linux: Add support for kernels < v2.6.39
Broke build for me on CentOS-6, which sports a 2.6.32 kernel:
http://www.cpantesters.org/cpan/report/d956d128-0339-11e8-b0d1-b6c4abd39192

CentOS-6 is supported till 2020-11-30.

Closes #1196.
2018-02-07 16:46:58 +01:00
Camilla Löwy ff6a8891d4 Make remaining tests set viewport in render loop 2018-02-07 16:46:51 +01:00
Camilla Löwy c29e4455bb Move more context logic out of glfwCreateWindow 2018-02-06 13:10:41 +01:00
Camilla Löwy 9bfa499d94 Formatting 2018-02-06 13:10:41 +01:00
Camilla Löwy 53b193a161 Wayland: Fix uninitialized variable warning
Related to #1143.
Fixes #1197.
2018-02-06 13:10:41 +01:00
Emmanuel Gil Peyrot e98102162f Fix -Werror in Travis, env gets overriden
Prevents #1197 from happening again.
2018-02-06 12:57:39 +01:00
Emmanuel Gil Peyrot f5d3954568 Stop checking for resizing
Fixes #1197
2018-02-06 12:57:17 +01:00
Camilla Löwy ae53cd29ef Improve context function error descriptions
Fixes #1193.
2018-01-30 19:28:37 +01:00
Camilla Löwy a678665c49 Cleanup 2018-01-30 19:28:37 +01:00
Corentin Wallez 8a8eefa0d8 Fail Vulkan surface creation if window has context
OpenGL / OpenGL ES cannot share presentation on a window with Vulkan.
This adds an error to `glfwCreateWindowSurface` when it is called on a
window without the GLFW_CLIENT_API hint set to GLFW_NO_API.  This
prevents undefined bahevior and hard to debug crashes.

Fixes #1194.
Closes #1205.
2018-01-30 19:25:17 +01:00
Emmanuel Gil Peyrot 525ad7bfb8 Close the libwayland-cursor handle after destroying the cursor theme
Fixes a segfault on glfwTerminate().
2018-01-29 04:55:55 +01:00
Emmanuel Gil Peyrot eb7c9994bf Prevent auto-iconify from firing on window creation 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 94c7aa0d67 Bump wayland-protocols to 1.12 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot f2617a671f Add a roundtrip after creating the xdg-surface
The specification says we must not attach a buffer until we’ve received
a configure event.
2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 4778d02c67 Ignore _glfwPlatformShowWindow when already visible 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot f710db6504 Ignore configure events of 0×0px 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 0e759c9422 Don’t set min/max size on GLFW_DONT_CARE 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot a162004a90 Documentation work 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot ae44a28125 Wayland: Add an alternate surface role using xdg-shell
This protocol matches desktops much better than the deprecated
wl_shell, fixing a bunch of race conditions, removing undefined
behaviour, adding missing features, and generally providing a much more
user-friendly experience.

Since most compositors don’t support it yet, the wl_shell_surface role
is kept as fallback for now.
2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 14856e8b60 Wayland: Bind, listen and destroy xdg_wm_base 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 73567ae5be Wayland: Add xdg-shell to the platform 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 0d5f7a9eab Wayland: Add xdg-shell to the build system 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot a199efae44 Wayland: Emit an error when wl_shell is absent or unusable 2018-01-29 03:59:47 +01:00
Emmanuel Gil Peyrot 14ad79f035 Documentation work
Added missing compilation instructions for Wayland build.
2018-01-29 03:25:24 +01:00
Emmanuel Gil Peyrot f9b0dc9827 Documentation work
Added missing documentation for Wayland dependencies and extensions.
2018-01-29 03:15:33 +01:00
Emmanuel Gil Peyrot 440e7e36f3 Fix typography of error messages 2018-01-29 02:34:10 +01:00
Emmanuel Gil Peyrot 407a3e2860 Load libwayland-cursor at runtime 2018-01-29 02:34:10 +01:00
Emmanuel Gil Peyrot 5fbf4ddde8 Load libwayland-egl at runtime 2018-01-29 02:34:10 +01:00
Emmanuel Gil Peyrot 6e69f63ffa Use the _glfw_dlopen/dlsym/dlclose define 2018-01-29 02:26:12 +01:00
Emmanuel Gil Peyrot eb732457ea Prevent a race between surface destruction and focus
The Wayland protocol is asynchronous, by the time we destroy a surface,
the compositor may have sent a wl_keyboard::enter or wl_pointer::enter
events which now point to no surface, yet we receive it after.

To prevent this race, we can just ignore any enter event targetting a
NULL surface.

Fixes #1150.
2018-01-29 02:03:24 +01:00
Camilla Löwy 973bf29622 Remove use of non-standard function strdup
Related to #873.
2018-01-17 11:56:35 +01:00
Camilla Löwy bb3ab87a18 Remove unmaintained internal Doxygen docs
The useful bits have been transformed to function definition comments.
The style guide stub has been added to the regular docs build.
2018-01-17 11:25:32 +01:00
Camilla Löwy d6b3a60fbc Documentation work
Added missing bits of documentation for GLFW_HOVERED.
2018-01-11 14:13:54 +01:00
Emmanuel Gil Peyrot 6c421f131d Wayland: Implement scale callback
Closes #1181.
2018-01-09 22:39:35 +01:00
Emmanuel Gil Peyrot 93186e4999 Wayland: Fix glfwTerminate segfault on failed init
Closes #1172.
2018-01-09 22:13:28 +01:00