This adds support for the XIM instantiate and destroy callbacks, letting
GLFW detect both when the current input method disappears and when a new
one is started.
Tested with ibus.
This moves the remaining bits of NSApplication initialization into
_glfwPlatformInit. As a side-effect of this, any command-line program
initializing GLFW will get a menu bar, which is not ideal.
If this has happened to you and a bisect led you here, please see the
GLFW_COCOA_MENUBAR init hint introduced in GLFW 3.3.
If this patch is a terrible idea, please get in touch in the 3.4 release
timeframe.
This is a replacement for 6e6805000a,
which attempts to preserve the existing menu bar creation behavior for
the 3.3-stable branch.
Fixes#1649.
This removes most references to GLU, replaces the legacy CMake cache
variables for OpenGL with the modern namespaced target and switches to
$() for command substitution.
Fixes#1580.
Some synthetic key messages come with a scancode of zero, causing them
to be translate to GLFW_KEY_UNKNOWN. This fills in the missing scancode
by translating the provided virtual key.
Rather than further complicate a single-use function, its body is merged
into the key message handler.
Fixes#1623.
The Win+V hotkey brings up a clipboard history IME that consumes the key
release. This adds left and right Super to the modifier keys manually
polled for undetected release during event processing.
Fixes#1622.
If the application is not linked against the Vulkan loader and relies on
a third-party loader library or glfwGetInstanceProcAddress, then our
call to dlopen will fail without a custom dyld environment variable.
This adds a fallback of looking in the directory of the main executable,
which matches the bundle structure recommended by the Vulkan SDK, making
that finally work out of the box for fully dynamic loading.
When the WM does not support EWMH or there is no WM running, GLFW falls
back to XSetInputFocus, which will emit BadMatch if the window is not
viewable, which will terminate the program.
Bug spotted on IRC.
A window resize action that also resulting in the window being moved did
not emit any window positions events, as the position of real
ConfigureNotify events was ignored. The real events use parent
coordinates instead of root coordinates so this adds parent tracking and
conditional translation.
Fixes#1613.
This removes the final dependency on CoreVideo, using a display link to
get the refresh rate of monitors where Core Graphics report a refresh
rate of zero. Instead we now query the I/O registry directly, similarly
to what the display link does at creation.
Thanks to @OneSadCookie for pointers to this solution.
CLOCK_MONOTONIC should not be used as a feature macro. The POSIX
feature macros are provided by unistd.h. CLOCK_MONOTONIC is provided by
time.h. CLOCK_MONOTONIC requires _POSIX_C_SOURCE >= 199309L on some
systems.
Polling the event queue before NSApp had been allowed to finish
launching, in our case by starting our self-terminating run loop,
triggered an assertion inside NSApplication.
This fix, which makes all event processing functions capable of starting
it, makes that assertion less likely.
A more Cocoa-friendly fix would be to finish launching NSApp during
glfwInit and let people annoyed by the menu bar disabled it with
GLFW_COCOA_MENUBAR. That may not be suitable for 3.3-stable, though.
Fixes#1543.
On macOS a destroyed window remained on screen until the next time
events were processed. This makes the behavior more consistent with
other platforms.
Fixes#1412.
KDE sometimes removes the Xft.dpi resource when it would be set to the
X11 default value of 96, causing GLFW to fall back to a value calculated
from the core display sizes in pixels and mm in a desktop environment
that supports Xft.dpi.
This moves to a hardcoded fallback value of 96 on the assumption that
there are more people running KDE with 96 DPI than there are people
running desktop environments that do not support Xft.dpi.
All of this is terrible please send help.
Fixes#1578.
This fixes the enabling of window decorations after creation. Instead
of removing the _MOTIF_WM_HINTS property, we now set or unset the
MWM_DECOR_ALL bit of the decorations field.
Fixes#1566.
Replaces `VERSION_GREATER_EQUAL` with `VERSION_EQUAL OR
VERSION_GREATER`. `VERSION_GREATER_EQUAL` was only added in CMake 3.7.
Fixes#1584.
Closes#1585.
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.
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.
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)
This changes the default value of the GLFW_BUILD_EXAMPLES and
GLFW_BUILD_TESTS CMake options to false when GLFW is being added as
a subdirectory by another CMake project.
If you want the previous behavior, force these options to true before
adding the GLFW subdirectory:
set(GLFW_BUILD_EXAMPLES ON CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)
Doing this is backward compatible with earlier versions of GLFW.
The GLFW_BUILD_DOCS option is left enabled as it also requires Doxygen
to have any effect, is quicker to build and is more likely to be useful
when GLFW is a subproject.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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>
The Wayland backend requires this package to generate headers from XML
protocol descriptions. Although this package was created by the KDE
project, it does not depend on any part of KDE.
Fixes#1013.
[ci skip]
The code blindly expected UTF8_STRING for files. It did not downgrade
based on source protocol version. It did not handle hostnames in
text/uri-list data. It did not specify the source time stamp when
converting the selection. It did not search the XdndTypeList when
necessary. It did not ignore sources that specified invalid versions.
While better, this is still not fully conformant. Hostnames are not
validated and it does not guard against source crashes.
Fixes#968.
This changes enumeration to add as a GLFW monitor any active adapter
without displays, even if other active adapters do have displays.
Related to #441.
Fixes#960.
This moves the buttons-as-hats logic to shared code and adds the
GLFW_JOYSTICK_HAT_BUTTONS input mode as a way to disable this legacy
behavior.
Fixes#889.
Look, a can of worms! I wonder what's inside.
This adds the first platform specific window hint, transforming
a compile-time option to a run-time per-window one.
Fixes formatting, semantics and documentation. Adds
glfwGetOSMesaContext. Adds support for OSMesa context attributes.
Updates changelog and credits. Adds license and copyright headers.
Removes superfluous code (the shared code provides many conveniences).
Removes loading of unused OSMesa functions. Removes empty platform
structs. Fixes version string format. Removes build dependency on
the OSMesa header and library (only the library is needed and only at
runtime).
Closes#850.
This adds basic support for MoltenVK, a Vulkan implementation on top of
Metal, on macOS 10.11 and later. It looks for MoltenVK in the process
via RTLD_DEFAULT symbol lookup if _GLFW_VULKAN_STATIC is disabled.
glfwCreateWindowSurface now creates and sets a CAMetalLayer for the
window content view, which is required for MoltenVK to function.
You must help CMake find MoltenVK for the Vulkan test to be built.
Fixes#870.
Cleanup of 8bdb105897.
Add build macro to configuration header and documentation. Add
corresponding CMake option. Add change log entry and credit. Add
loader static library to link dependencies and add detection to
FindVulkan.cmake.