Commit Graph

4787 Commits

Author SHA1 Message Date
Camilla Löwy
e28397bda0 Cocoa: Fix glfwGetCocoaWindow error return value 2024-02-20 16:29:41 +01:00
Camilla Löwy
8f2f766f0d NSGL: ANGLE exists 2024-02-20 16:27:51 +01:00
Camilla Löwy
f6360eadee NSGL: Fix missing check for OpenGL profile
macOS only provides the core profile for OpenGL 3.2 and later.
2024-02-20 15:55:24 +01:00
Doug Binks
1fb7f0e120 Cocoa: Added glfwGetCocoaView native access function
Resolves #2235

Co-authored-by: mightgoyardstill <mightgoyardstill@users.noreply.github.com>
2024-02-20 13:20:30 +00:00
Camilla Löwy
0bb605cd79 Wayland related documentation work 2024-02-19 15:08:51 +01:00
Camilla Löwy
559bd3adb9 Add credit
Related to #2035
2024-02-19 14:44:02 +01:00
Florian Hülsmann
65102e2005 Prefer Wayland over X11
When GLFW_ANY_PLATFORM is used (which is the default), X11 would be
selected on a Wayland system with XWayland and where XDG_SESSION_TYPE
was not set.

Closes #2035
2024-02-19 14:39:50 +01:00
Camilla Löwy
dbf7cfc4dc Update credit
Related to #2204
2024-02-19 14:21:55 +01:00
Camilla Löwy
42afd127a9 Documentation work 2024-02-19 14:21:55 +01:00
Camilla Löwy
7bdcdf435a Cleanup 2024-02-19 14:21:48 +01:00
Camilla Löwy
c8372cda08 Documentation work 2024-02-19 14:20:52 +01:00
Camilla Löwy
1ce41b358b Null: Remove unused struct member 2024-02-19 14:20:52 +01:00
Camilla Löwy
af5d250553 Wayland: Remove separate window title copy 2024-02-19 14:20:52 +01:00
Doug Binks
95d464bb4b Add glfwGetWindowTitle
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 #1448
Closes #1909
Closes #2482
2024-02-19 14:20:52 +01:00
Camilla Löwy
bafece4cf7 Update Wayland remarks for glfwCreateWindow
The backend has improved somewhat and support among compositors for some
protocols have improved to the point that they can be relied upon.
2024-02-19 14:19:36 +01:00
Camilla Löwy
64b4f0f30c Null: Fix missing damage event 2024-02-16 12:36:15 +01:00
Camilla Löwy
a53ce7e8b8 Null: Fix window/framebuffer size event order 2024-02-16 12:36:15 +01:00
Camilla Löwy
f0ec791386 X11: Cleanup
The actual reported bug was fixed at some point during the refactoring
of the Wayland backend.  This is only a bit of tidying.  Updating the
cache before emitting events is always a nice thing to do.

Closes #2046
2024-02-16 12:34:03 +01:00
Camilla Löwy
14e653358b Add support for XDG_SESSION_TYPE env variable
Related to #2439
2024-02-16 00:18:44 +01:00
Camilla Löwy
690a15f929 Wayland: Implement GLFW_RESIZABLE for XDG toplevel
This implements GLFW_RESIZABLE for all paths where we manage our own
xdg_toplevel, namely XDG decorations and fallback decorations.

Fixes #2203
2024-02-16 00:13:33 +01:00
Camilla Löwy
b61f3fc479 Wayland: Fix invalid size protocol error
This could happen when resizing a window with fallback decorations.

Fixes #2204
2024-02-16 00:13:32 +01:00
Camilla Löwy
a650c69cff Wayland: Decide final window size in one place 2024-02-16 00:12:50 +01:00
Camilla Löwy
2b3f919b60 Wayland: Add support for fractional scaling
This adds basic support for fractional-scale-v1.

Note that this introduces a potential discrepancy between window and
monitor content scales.
2024-02-14 22:35:46 +01:00
Camilla Löwy
a9cc7c7260 Add GLFW_SCALE_FRAMEBUFFER window hint
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.
2024-02-14 22:35:46 +01:00
Camilla Löwy
63397fb0d5 Convert some external links to reference links 2024-02-14 22:35:46 +01:00
Camilla Löwy
532bd66e7f Convert Doxygen tables of contents to Markdown 2024-02-14 22:35:46 +01:00
Camilla Löwy
244852a93a Convert Doxygen paragraphs to Markdown 2024-02-14 22:35:46 +01:00
Camilla Löwy
973a3c0b31 Fix Markdown syntax for link 2024-02-14 22:35:46 +01:00
Camilla Löwy
1a0bae7fa8 Convert Doxygen code sections to Markdown 2024-02-14 22:35:45 +01:00
Camilla Löwy
611099f745 Convert Doxygen headings to Markdown 2024-02-14 22:35:45 +01:00
Camilla Löwy
3e73a5c76c Rename Doxygen files to Markdown 2024-02-14 22:35:45 +01:00
Camilla Löwy
e3e41ba339 Move to Doxygen 1.9.8 and later 2024-02-14 22:35:32 +01:00
Camilla Löwy
fb10e95f78 Add language tags for C code sections 2024-02-13 21:28:24 +01:00
Camilla Löwy
d93868bcf3 Win32: Fix handling of local absolute raw motion
The implementation for how to handle absolute raw motion remotely is
just how to handle absolute raw motion, period.
2024-02-13 19:12:05 +01:00
Camilla Löwy
275b92f887 Win32: Clean up RDP hidden cursor workaround 2024-02-13 18:13:01 +01:00
Camilla Löwy
6c1e3fd84c Win32: Use existing cursor creation path 2024-02-13 17:36:35 +01:00
Camilla Löwy
efffd492dd Wayland: Check all xkbcommon entry points 2024-02-13 17:36:35 +01:00
Camilla Löwy
77ced84e9c Use C99 instead of hard-coded indices 2024-02-13 17:36:35 +01:00
Camilla Löwy
8946f5314d Win32: Add GLFW_WIN32_SHOWDEFAULT
Fixes #2359
2024-02-13 17:36:35 +01:00
Camilla Löwy
2afd57bf9b Expand documentation for custom allocator
Fixes #2298
2024-02-13 17:35:59 +01:00
Camilla Löwy
a12311e596 Document GLFW_FLOATING not supported on Wayland 2024-02-12 22:50:25 +01:00
Camilla Löwy
bb951b4b71 Use C99 fminf and fmaxf 2024-02-12 22:50:25 +01:00
Camilla Löwy
5a0ab56ed7 Fix spelling 2024-02-12 22:50:25 +01:00
Camilla Löwy
30127690a2 Add credit
Related to #2445
2024-02-12 15:59:11 +01:00
Camilla Löwy
6f1ddf51a1 Wayland: Remove unused struct member 2024-02-12 13:06:59 +01:00
Camilla Löwy
6565c0cc04 Update changelog and add credit
Related to #2446
2024-02-12 13:06:59 +01:00
Victor Chernyakin
edd38207a6 Linux: Set O_CLOEXEC on evdev fd
Closes #2446
2024-02-12 13:06:59 +01:00
Camilla Löwy
9953f7ead1 Wayland: Cache framebuffer size
The calculation of framebuffer size is about to get more complicated
with the introduction of fractional-scale-v1, so only do it in one
place.

This is also a tiny preparation for eventually behaving better towards
wl_egl_window_resize.
2024-02-12 13:06:59 +01:00
Camilla Löwy
1be7bc546b Wayland: Clean up data types related to scales 2024-02-12 13:06:59 +01:00
Camilla Löwy
4c283e4a3c Wayland: Be more specific about scales
We are about to introduce another scaling method (fractional-scale-v1),
so it will become more important to be specific about what scales are
used where and what their units are.

This removes 'content scale' from window and monitor structs.  A monitor
(output) now has just a 'scale', which becomes a 'buffer scale' when
applied to a window.  A window now has a list of 'output scales' to
select its buffer scale from.  Content scales are calculated from the
respective monitor or window when queried, even if the calculation right
now is to just return the same value as before.
2024-02-12 13:06:59 +01:00