This adds a function for querying the current title of a window. This
currently returns a copy of the last title set via GLFW.
Fixes#1448Closes#1909Closes#2482
This adds the GLFW_SCALE_FRAMEBUFFER window hint, enabling control of
framebuffer scaling across Wayland and macOS. On macOS, this window
hint is a new name for GLFW_COCOA_RETINA_FRAMEBUFFER, and both hint
names will modify the same hint.
This is now a more symmetric counterpart to GLFW_SCALE_TO_MONITOR and,
weirdly, they each apply neatly to half of the supported platforms.
This commit is mostly documentation updates to better integrate and
contrast these two scaling mechanisms.
This implements window focus requests via the xdg-activation-v1
protocol. These requests will likely only work when another window of
the same application already has input focus, but that isn't unlike the
behavior of other platforms.
The GLFW_FEATURE_UNAVAILABLE error has been removed from this function
for now.
Related to #2284
Related to #2306
Related to #2439
This implements window attention requests via the xdg-activation-v1
protocol.
This was updated by @ elmindreda to work with recent Wayland related
changes to the main branch:
- Switched to current way of handling Wayland protocol files
- Added the xdg-activation-v1.xml protocol file to deps/wayland
- Added missing macros to rename protocol interface globals
The protocol file was copied from wayland-protocols 1.33.
Closes#2287
This changes the default platform for Unix-like systems (other than
macOS) from only X11 to Wayland and X11. It also removes the backward
compatibility with the older GLFW_USE_WAYLAND CMake option.
If a bisect took you here because your build broke, hello, sorry, set
the GLFW_BUILD_WAYLAND or GLFW_BUILD_X11 CMake option to disable the
associated platform.
This can be done when configuring GLFW with CMake, from a higher-level
CMakeLists.txt if GLFW is part of your project, or at any point after
configuration by updating the CMake cache with the command-line tool or
the GUI.
The next step is to make Wayland the run-time default when enabled, but
that will hopefully not break any builds.
Related to #2439
The list of compile-time dependencies on FreeBSD lacked evdev-proto.
Unlike on Linux, the input-event-codes.h header file was not implicitly
included on FreeBSD.
Fixes#2445
This brings the latest released versions of all used Wayland protocol
files into this repository, removing the need for the user to arrange
a sufficiently new version of wayland-protocols.
The wayland.xml protocol file was copied from wayland 1.22.0.
The additional protocol files were copied from wayland-protocols 1.32.
Because of how files are moved and renamed inside the wayland-protocols
repository, it will not always be possible to update all our protocol
files from a single release without also potentially updating related
code (acceptable) and prematurely breaking compatibility with
compositors that still only support an earlier incompatible version
(unacceptable).
The macro in src/CMakeLists.txt has been modified to hopefully make it
easier to add new protocol files. This made it necessary to change the
name of a few of the generated header files.
Closes#2053
Shifted the documentation away from the term 'named keys' as something
different than keys that glfwGetKeyName will return a name for. The
already existing term 'key token' should now be used to refer to the
GLFW_KEY_* constants.
The associated term 'named mouse button' was also replaced with
'supported mouse button'.
The parts explaining which key tokens will return a valid scancode from
glfwGetKeyScancode have hopefully been clarified. This issue was
reported in #2055.
The GLFW_KEY_UNKNOWN constant has been moved out of the list of key
tokens to simplify and hopefully clarify the related documentation.
Various other keyboard key related edits were made, hopefully resulting
in improvements.
Related to #2055
This is partly based on the implementation of libdecor support in
PR #1693 by @ christianrauch.
Where available, the libdecor library is loaded at init and becomes the
preferred method for window decorations. On compositors that support
XDG decorations, libdecor in turn uses those. If not, libdecor has
a plug-in archtecture and may load additional libraries to either use
compositor-specific decorations or draw its own.
If necessary, support for libdecor can be disabled with the
GLFW_WAYLAND_LIBDECOR init hint. This is mostly in case some part of
the dynamic loading or duplication of header material added here turns
out to cause problems with future versions of libdecor-0.so.0.
Fixes#1639Closes#1693
Related to #1725
On systems lacking the EGL_EXT_present_opaque extension, some
compositors treat any buffer with an alpha channel as per-pixel
transparent.
This commit ignores any EGLConfig with an alpha channel if the extension
is missing and the window is created with GLFW_TRANSPARENT_FRAMEBUFFER
set to false.
This is technically not a breaking change since GLFW_ALPHA_BITS is not
a hard constraint, but it is still going to inconvenience anyone using
the framebuffer alpa channel to store other kinds of data.
Related to #1895
This adds window hints for the initial position, in screen coordinates,
of a window. The special value GLFW_ANY_POSITION means the window
manager will be allowed to position the window.
It is not possible to set window positions on Wayland and GLFW will
always behave as if these hints are set to GLFW_ANY_POSITION.
Fixes#1603Fixes#1747
This fixes spelling, grammar and punctuation issues, missing words and
stray words across the documentation. A confusing sentence was removed
from the tutorial.
Closes#2085
This adds a window hint string for the xdg_toplevel::app_id, which is
used by desktop environments to connect windows with application icons
and other information. This is similar to the WM_CLASS property on X11.
A few very minor fixes were done by @elmindreda during merge.
Fixes#2121Closes#2122
There is a seemingly unavoidable race condition when waiting for data on
the X11 display connection, as long as any other thread is also making
Xlib calls. The event data we are waiting for could be read by the
other thread as part of looking for the reply to its request, before our
poll has begun.
This commit replaces the X11 event sent by glfwPostEmptyEvent with
writing to an unnamed pipe. The race condition remains if other Xlib
calls are made on other threads, but glfwPostEmptyEvent should now be
race-free.
This commit is based on work by pcwalton, OlivierSohn, kovidgoyal and
joaodasilva.
Closes#2033
Related to #379
Related to #1281
Related to #1285
The Wayland backend now requires xkbcommon-compose, which was added in
version 0.5.0. xkbcommon 0.5.0 was released in 2014.
This removes the non-composing fallback path for text input.
This removes the GLFW_VULKAN_STATIC CMake option and the
_GLFW_VULKAN_STATIC configuration macro and replaces them with the
glfwInitVulkanLoader function, allowing a single library binary to
provide both behaviors.
This is based on the design from PR #1374 by @pmuetschard.
Closes#1374Closes#1890
This more or less restores the original custom layout where the TOC is
on the right side, with a CSS workaround added for portrait orientation.
The indentation of sub-lists in the TOC has been decreased.
The sizes of HTML headings and the "h0" div generated for each Doxygen
page have been adjusted to look better together now that they can meet.
A few headings have been shortened to fit better in the narrower TOC.
This was especially bad in the window guide, where the TOC ended up
having "Window related hints" and "Windows specific window hints" close
to one another.
This commit only fixes headings. There are likely issues in the actual
text as well.