Commit Graph

614 Commits

Author SHA1 Message Date
Camilla Löwy 934f0e9ff1 Update changelog and add credit
Related to #1556.

(cherry picked from commit 26aac53e1d)
2019-09-23 15:26:43 +02:00
Camilla Löwy 30e67357be Win32: Fix GLFW_MAXIMIZED not maximizing window
The window rect adjustment for content scale broke the initial, correct
maximization performed when creating the window with WS_MAXIMIZE.  This
switches to updating the restored rect instead of the current rect.

Fixes #1499.
Closes #1503.

(cherry picked from commit 711b9694a1)
2019-09-23 15:25:51 +02:00
Camilla Löwy 1e8dc836a0 Fix Vulkan triangle test segfault on resize
The command buffer handle was not reset after being freed on window
resize, leading to a segfault when the stale handle was used.

(cherry picked from commit 65748fb8f3)
2019-09-23 15:25:28 +02:00
Camilla Löwy b1309dd42a Add credit
(cherry picked from commit b0692d73ddb66461549cda0a009f867dab9de0fd)
2019-07-22 23:26:02 +02:00
Camilla Löwy 8e923e592d Documentation work
[ci skip]

(cherry picked from commit a4d910b4a7)
2019-07-16 14:41:23 +02:00
Leon Linhart 9fc035a562 Win32: Fix cursor enter/position event order
This fixes the cursor enter event being emitted after the first cursor
position event on Windows.

Closes #1490.

(cherry picked from commit 4f0b8b0dda)
2019-07-16 14:41:16 +02:00
Camilla Löwy ce7cd3e288 Add credits
(cherry picked from commit 7bd0af3089)
2019-07-16 14:41:10 +02:00
Camilla Löwy 248e827673 Win32: Fix symbol redefinition warnings
When both GLFW_INCLUDE_VULKAN and VK_USE_PLATFORM_WIN32_KHR were
defined, the GLFW header would define replacement versions of APIENTRY
and WINGDIAPI /before/ including the Vulkan header, which would include
windows.h, which (justifiably) defines APIENTRY and WINGDIAPI blindly.

Fixes #1524.

(cherry picked from commit 773f4495f0)
2019-07-16 14:40:52 +02:00
Camilla Löwy 95e7ad7e5b Update changelog
Related to #1528.

(cherry picked from commit 5bea122211)
2019-07-16 14:40:39 +02:00
Camilla Löwy 5416e347ad Enable CMake policy CMP0077 where available
This will let higher-level projects override GLFW CMake options with
normal variables instead of having to use cache variables.

This means with CMake 3.13 and later you can now do:

set(GLFW_BUILD_TESTS ON)
add_subdirectory(path/to/glfw)

Instead of the more verbose:

set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)

(cherry picked from commit 71e6ff386d)
2019-05-27 16:34:40 +02:00
Camilla Löwy 4d99045e87 Add credit
Related to #1480.

(cherry picked from commit 57bf6b2f75)
2019-05-19 18:32:28 +02:00
Camilla Löwy 9cc83cf07f X11: Fix CMake not checking for XInput2 headers
Fixes #1480.

(cherry picked from commit 090b16bfae)
2019-05-19 18:27:06 +02:00
Camilla Löwy e826f839a4 Update changelog and add credit
(cherry picked from commit 42a3e4434f)
2019-05-19 18:27:01 +02:00
Camilla Löwy a9343d641c Start 3.3.1 2019-04-16 14:48:16 +02:00
Camilla Löwy b079610962 Documentation work 2019-04-16 01:40:30 +02:00
Camilla Löwy 186e9372d5 Add credit 2019-04-16 01:05:57 +02:00
Camilla Löwy 3c3981a4f0 Cocoa: Fix coordinate transformations
Window relative mouse locations provided via NSWindow and NSEvent are
based at 0,1 while screen relative locations use 0,0.  Incorrect
handling of this had crept into other coordinate transformations.  Note
that most of these errors canceled each other out, so the reported
positions of windows, monitors and work areas are unaffected.  This
corrects the cursor position for glfwGetCursorPos and glfwSetCursorPos.

Fixes #1461.
2019-04-15 14:52:17 +02:00
Camilla Löwy d7e30b1c74 Replace glad and the Vulkan SDK with glad2
This removes all dependencies from the GLFW test programs on the Vulkan
SDK.

It also removes support for linking the GLFW shared library (dynamic
library, DLL) against the Vulkan loader static library.
2019-04-15 02:45:48 +02:00
Camilla Löwy 422bf79e8f Documentation work 2019-04-05 03:26:52 +02:00
Camilla Löwy 6e382c9b7f Add credit 2019-04-01 18:23:21 +02:00
Camilla Löwy 8055dad7e4 Update changelog and add credit 2019-03-05 20:22:00 +01:00
Camilla Löwy a43d1a4937 Documentation work
Fixes #920.
Related to #1322.
2019-03-05 16:59:46 +01:00
Felipe Ferreira da Silva be295ccbea Add glfwGetMonitorWorkarea
This function retrieves the work area rectangle of the specified
monitor.

Related to #920.
Closes #989.
2019-03-05 16:10:59 +01:00
Camilla Löwy 1155c83013 Rename raw input to raw mouse motion, cleanup
This renames 'raw input' to 'raw mouse motion' as there are other kinds
of raw input.  The update path is restructured to avoid reinitializing
all of disabled cursor mode.  Modification of shared state is moved out
into shared code.  Raw mouse motion is disabled by default for
compatibility.

Related to #1401.
2019-02-22 13:04:11 +01:00
Nathan Poirier 9e29f556fd Add GLFW_RAW_INPUT and glfwRawInputSupported
This adds runtime per-window control of whether accelerated or raw mouse
motion is provided when the cursor is disabled.

Fixes #1400.
Closes #1401.
2019-02-22 13:04:11 +01:00
Camilla Löwy e2fa82ffbb Cleanup
Related to #1431.
2019-02-13 23:21:05 +01:00
Camilla Löwy 463ef7eb71 Cocoa: Fix handling of analog joystick buttons
The reported state was not clamped to [0,1], i.e. GLFW_RELEASE and
GLFW_PRESS.

Fixes #1385.
2019-01-31 01:54:49 +01:00
Camilla Löwy 51ca41dd9f Cocoa: Add missing IOHID page and usages
Related to #1385.
2019-01-31 01:53:55 +01:00
Camilla Löwy 530b37f4db Cocoa: Disable automatic tabbing for GLFW windows
Related to #1250.
2019-01-31 00:20:24 +01:00
Camilla Löwy 78e6a0063d X11: Fix EWMH state update for hidden windows
The EWMH window state code assumed the window was mapped.

Fixes #1358.
2019-01-31 00:02:16 +01:00
Camilla Löwy 55b1a16f90 Remove window requirement for all event functions
This lets an application wait for non-window events without needing to
create a window.

Fixes #1317.
2019-01-15 19:28:17 +01:00
Camilla Löwy 9a9568212c Cocoa: Move slightly towards modern Objective-C 2019-01-10 23:20:56 +01:00
Camilla Löwy 72c3908e14 X11: Fix glfwSetWindowMonitor not flushing buffer 2019-01-02 21:55:30 +01:00
Camilla Löwy cde0aaaab1 X11: Fix glfwSetWindowMonitor not updating hints
This makes glfwSetWindowMonitor update the WM_NORMAL_HINTS when resizing
non-user-resizable windowed mode windows.
2019-01-02 21:55:30 +01:00
Camilla Löwy c90c7b9710 Add credit
Related to #1383.
2018-12-26 15:22:36 +01:00
Camilla Löwy 1635fe2826 Cleanup
Put the non-client painting related message cases with the client ones
so that they can be happy together.

Related to #1383.
2018-12-26 15:22:20 +01:00
Camilla Löwy 3531c320af Fix glfwSetGamma generating ramps of invalid sizes
This makes glfwSetGamma generate a gamma ramp of the same size as the
monitor's current ramp, which will avoid failure on non-256 entry
monitors on X11 and avoid ramp interpolation on macOS.

Closes #1387.
Fixes #1388.
2018-12-26 15:00:39 +01:00
Camilla Löwy a533c9b3ca Add credit
Related to #1387.
2018-12-26 14:59:31 +01:00
Camilla Löwy 91c1ff1b7d Cleanup 2018-12-25 21:40:48 +01:00
Keith Bauer c4903d9267 Cocoa: Fix half of all key events for Caps Lock
This adds reporting of those Caps Lock key events that cause the lock
state to change.

The full fix involving IOHID is being worked on in #1368.

Related to #1368.
Closes #1373.
2018-12-25 21:39:48 +01:00
Camilla Löwy cf0857f79a Add credit 2018-12-25 20:52:58 +01:00
Emmanuel Gil Peyrot cc3552465d x11: Add a mention of #1366 in the ChangeLog. 2018-11-03 14:20:16 +01:00
meditator d9466050d9 X11: Fix missing check for NET_WM_STATE
Closes #1356.
2018-11-01 17:26:51 +01:00
Camilla Löwy 5595fa3ae6 Cocoa: Fix OpenGL rendering not being displayed
Fix based on information provided by @rcgordon.

Fixes #1334.
Closes #1346.
2018-10-26 16:24:16 +02:00
Camilla Löwy fac7d531ec Update changelog 2018-10-21 15:04:27 +02:00
Emmanuel Gil Peyrot cc805c0963 Mir: Remove this experimental backend
As of the release of Mir 1.0, libmirclient has been deprecated[1] and
its developers recommend clients using it to switch to Wayland.  This
patch removes support for libmirclient and instruct users to use the
experimental Wayland backend instead.

[1] https://discourse.ubuntu.com/t/mir-news-28th-september-2018/8184
2018-10-05 11:59:26 +02:00
Camilla Löwy 3238f2291f Update changelog
Related to #1316.
2018-08-30 13:47:54 +02:00
Camilla Löwy 018ab7229b Add credit 2018-08-09 19:03:57 +02:00
Doug Binks 0be4f3f75a Add GLFW_FOCUS_ON_SHOW window hint and attribute
This adds a window hint and attribute for controlling whether
glfwShowWindow gives the specified window input focus in addition to
making it visible.

Fixes #1189.
Closes #1275.
2018-05-29 15:51:36 +02:00
Camilla Löwy ab3bfb4205 Cocoa: Update MoltenVK support for LunarG SDK
GLFW now checks for the libvulkan.1.dylib loader instead of what is now
the ICD.  This removes checking for libMoltenVK.dylib to avoid cryptic
errors.  This unfortunately also breaks compatibility with the
standalone MoltenVK SDK.

This also removes support for the static loader library as that is not
present in the LunarG SDK.

Related to #870.
2018-03-01 21:45:46 +01:00
Camilla Löwy 77879736af Cocoa: Event polling did not initialize AppKit
Fixes #1218.
2018-03-01 02:23:27 +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
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
Camilla Löwy 2c1fc13ee4 Update changelog 2018-01-09 20:36:13 +01:00
ocornut 20b12204af Win32: Fix GLFW_FOCUSED hint being ignored
The window was activated by _glfwPlatformShowWindow, causing the
GLFW_FOCUSED window hint to be ignored when set to false.

Fixes #1179.
Closes #1180.
2018-01-09 20:36:13 +01:00
Camilla Löwy ee9dffcd66 Add GLFW_HOVERED for polling cursor hover state
This window attribute corresponds to the cursor enter/leave callback.

Fixes #1166.
2018-01-09 18:02:52 +01:00
Camilla Löwy 370eac3c48 Add glfwSetWindowContentScaleCallback
Related to #677.
Related to #1115.
2018-01-09 18:00:22 +01:00
Camilla Löwy ac94014ef8 Update changelog and add credit 2018-01-05 11:35:44 +01:00
Camilla Löwy 7c2c7858c6 Add monitor and joystick user pointers 2017-12-19 15:08:28 +01:00
Camilla Löwy 9da2285b14 Cocoa: Make frame autosave hint a string 2017-12-19 15:08:28 +01:00
Camilla Löwy 6158801aeb Change glfwInitHintString to glfwWindowHintString
Fixes #1139.
2017-12-19 15:08:27 +01:00
Camilla Löwy 18ee28bf82 Add credits 2017-12-19 15:08:26 +01:00
Emmanuel Gil Peyrot c3cba58a71 Remove trailing whitespace 2017-12-14 15:36:55 +01:00
Camilla Löwy 0e8c4ea7ce Add lock key modifier bits input mode
This adds the GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK modifier bits.
Set the GLFW_LOCK_KEY_MODS input mode to enable these for all callbacks
that receive modifier bits.

Fixes #946.
2017-12-06 18:01:34 +01:00
Camilla Löwy b8df6ae3c1 Finish deprecating charmods callback 2017-12-06 18:01:32 +01:00
Camilla Löwy 9e6c0c747b X11: Fix segfault when using NVidia EGL 2017-11-27 15:54:33 +01:00
Camilla Löwy b5e24676a4 Move contribution guide to visible directory 2017-11-20 18:55:43 +01:00
Camilla Löwy 1fe319d234 Cocoa: Filter out duplicate size events
Fixes #1085.
2017-11-16 11:56:06 +01:00
Camilla Löwy d630684654 Win32: Remove double resize of full screen window
Related to #1085.
2017-11-16 11:56:03 +01:00
Camilla Löwy 8b81a03a5a Cocoa: Remove double resize of full screen window
Related to #1085.
2017-11-16 11:37:00 +01:00
Camilla Löwy 9903f88947 Documentation work 2017-11-16 11:35:55 +01:00
Camilla Löwy 11e47f08b1 Add glfwGetWindowOpacity and glfwSetWindowOpacity
This adds support for setting the opacity of the whole window, including
any decorations.

Fixes #1089.
2017-11-15 15:46:01 +01:00
Camilla Löwy 49130ab8ec Rename framebuffer transparency hint
This is a breaking change of an unreleased API.
2017-11-14 17:21:36 +01:00
Camilla Löwy 31cbb20ba2 Deprecate window parameter of clipboard functions 2017-11-10 02:52:16 +01:00
Camilla Löwy 80d181f12d Win32: Fix maximization of undecorated windows
Fixes #899.
2017-10-31 15:47:01 +01:00
Camilla Löwy 16bf872117 Add content scale queries
This adds glfwGetWindowContentScale and glfwGetMonitorContentScale for
querying the recommended drawing scale factor for DPI-aware rendering.

Parts of this patch are based on code by @ferreiradaselva.

Fixes #235.
Fixes #439.
Fixes #677.
Fixes #845.
Fixes #898.
2017-10-26 17:26:36 +02:00
Camilla Löwy 5aeb37d1b8 Cocoa: Fix window title being lost when untitled
The window title was lost and could not be updated while the window did
not have NSWindowStyleMaskTitled set.

Fixes #1082.
2017-09-28 19:04:11 +02:00
Camilla Löwy 32e78aeb2e Add GLFW_TRANSPARENT attribute and documentation
This completes support for window framebuffer transparency on Windows,
macOS and X11.  Note that the hint/attribute may be renamed before
release to clarify its relationship to GLFW_OPACITY.

Fixes #197.
Closes #1079.
Related to #663.
Related to #715.
Related to #723.
Related to #1078.
2017-09-27 21:54:04 +02:00
Camilla Löwy 176ab9a5d2 Fix Doxyfile gen not handling paths with spaces
Fixes #1081.
2017-09-24 17:04:47 +02:00
Camilla Löwy 0b5023bc62 X11: Fix Latin-1 text not being converted to UTF-8 2017-09-17 13:50:10 +02:00
Camilla Löwy 9dbc935afb X11: Stop reporting support for COMPOUND_TEXT 2017-09-17 13:50:10 +02:00
Camilla Löwy f7dc6df02c X11: Add support for reading clipboard via INCR
This allows glfwGetClipboardString to retrieve clipboard contents larger
than (typically) 2^18 bytes.

Related to #275.
2017-09-17 13:50:00 +02:00
Camilla Löwy f30acd8f74 Add OSMesa to context API list 2017-09-17 13:46:52 +02:00
Camilla Löwy 16ae02ab85 Add CMake target for updating gamepad mappings
This adds the 'mappings' build target that downloads the upstream
gamecontrollerdb.txt file and regenerates the mappings.h header.

Related to #900.
2017-09-15 15:50:39 +02:00
Camilla Löwy f8668c5a9f Win32: Fix key names not matching other platforms
This brings printable key names more in line with the results provided
on other platforms.

Fixes #943.
2017-09-13 17:55:51 +02:00
Camilla Löwy a368d89c94 Win32: Fix disabled cursor mode vs caption buttons
This postpones disabling the cursor until the user is done interacting
with a caption button.

Related to #650.
Fixes #1071.
2017-09-08 16:18:15 +02:00
Camilla Löwy 58a247b26d Cocoa: Fix some characters not repeating
Fixes #1010.
2017-08-23 19:10:35 +02:00
Camilla Löwy 2f8b71d7a1 Add and update credits 2017-08-23 15:11:59 +02:00
Camilla Löwy ce5e649d3b Cleanup
Move global data to library struct.  Simplify semantics.  Update
changelog.

Related to #1028.
2017-08-23 13:24:05 +02:00
Camilla Löwy c23fca6343 Fix APIENTRY from windows.h being undefined
Some extension loader headers include windows.h.  If they were included
before glfw3.h, glfw3native.h would leave APIENTRY undefined.  This adds
the GLFW_APIENTRY_DEFINED macro to signal when GLFW "owns" APIENTRY and
may undefine it.

Fixes #1062.
2017-08-21 16:01:32 +02:00
Camilla Löwy af866e05d2 Cleanup
Related to #973.
2017-08-18 14:36:36 +02:00
Camilla Löwy b7a0f225ea Cleanup
Don't advertise native functions in public API guides.  Don't list
primary selection access as most notable new feature.  Don't have
different levels of abstraction among selection helper functions.  Don't
forget to take credit.

Related to #1056.
2017-08-13 21:22:36 +02:00
Kristian Nielsen 29a75ab09d X11: Add native access to primary selection
This adds the native access functions glfwSetX11SelectionString and
glfwGetX11SelectionString under GLFW_EXPOSE_NATIVE_X11.  They are
similar to glfwSetClipboardString and glfwGetClipboardString but operate
on the PRIMARY selection.

The primary selection is widely used in X11, and so seems important to
support.  Primary selection is mostly an X11-specific thing, hence it's
exposed as an X11 native interface.

Fixes #894.
Closes #1056.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2017-08-13 18:52:24 +02:00
Camilla Löwy 079518617c Linux: Fix missing feature macro for using strdup
This adds _XOPEN_SOURCE = 500.

Fixes #1055.
2017-08-09 16:25:47 +02:00
Camilla Löwy f95c9d1bf3 Win32: Fix XInput axis normalization
Fixes #1045.
2017-08-09 12:20:50 +02:00
Camilla Löwy 75e44abf09 Win32: Remove deadzone logic from XInput path
Related to #1021.
Related to #1045.
2017-08-09 12:20:42 +02:00
Camilla Löwy a397195d3f Linux: Make joystick init always fail silently
Related to #833.
2017-08-09 12:18:28 +02:00
Camilla Löwy ab2247f8f3 Cocoa: Fix string object being updated incorrectly
Fixes #1050.
2017-08-06 23:27:58 +02:00
Camilla Löwy 5b7281bd41 Add glfwGetJoystickGUID
This function completes the first round of support for
SDL_GameControllerDB.

Fixes #900.
2017-07-30 16:15:12 +02:00
Camilla Löwy 213dd2d0d6 Add glfwInitHintString
Adds string type init hints.  Adds X11 specific init hints for WM_CLASS
components.  Documentation work.

Fixes #893.
2017-07-25 23:53:52 +02:00