Commit Graph

69 Commits

Author SHA1 Message Date
Camilla Löwy
bcb8558189 Remove EGL and OSMesa struct member macros
Now that the EGL and OSMesa structs can be used safely by any platform,
the member macros serve no purpose.
2020-06-24 00:50:49 +02:00
Camilla Löwy
d7f7b0e1b5 EGL: Replace native handle macros with functions
This change is in preparation both for EGL_EXT_platform_base and runtime
GLFW platform selection.

Related to #1691.
2020-06-24 00:48:53 +02:00
Emmanuel Gil Peyrot
a9f674e719 Wayland: Don’t reload the cursor on every pointer motion
Previously, any pointer motion in the window decorations when using the
fallback implementation would obtain the wl_cursor again, and do the
attach danse for no benefit.

This will ultimately allow animated cursors to not reset to the first
frame on motion, once these will be implemented.
2019-11-21 13:52:37 +01:00
Corentin Wallez
3a37a08998 Fix -Wextra-semi warnings
Closes #1440.
2019-10-17 20:09:38 +02:00
Luflosi
d25248343e Use the correct type for a struct member
The `name` member in the `_GLFWmonitorWayland` struct is used in two places. It is assigned the value from a variable of type `uint32_t` and is compared to another variable of type `uint32_t`, so `name` should also have the same type.

Closes #1569.
2019-10-06 17:36:46 +02:00
Emmanuel Gil Peyrot
599fb3de34 Wayland: Remove wl_shell support
This protocol is part of the core Wayland, but it is pretty badly
designed and is missing quite a few features, and is in the process of
being phased out in compositors.  Its support in GLFW requires
duplicating pretty much every single window management codepath.

This bumps the required compositor versions to the ones which have
implemented xdg-shell, approximately two years ago, which seems sensible
to me.
2019-04-20 10:05:15 +02:00
Camilla Löwy
a337c56848 Start 3.4 2019-04-16 23:08:39 +02:00
Emmanuel Gil Peyrot
45bd991ea9 Wayland: Fix auto-iconify on kwin_wayland
We now keep track of the fullscreen and activated state and only iconify
if we were previously fullscreen and now we are either not fullscreen or
not activated anymore.

This is the proper way to do it, compared to the previous hack where we
didn’t iconify only if it was the first configure event received.
2019-02-15 18:12:09 +01:00
Emmanuel Gil Peyrot
c08abffc50 Wayland: Implement clipboard copy 2018-10-24 14:03:08 +02:00
Emmanuel Gil Peyrot
8b54e28c4e Wayland: Implement clipboard paste 2018-10-24 14:03:08 +02:00
Emmanuel Gil Peyrot
3c4b9a7eef Wayland: Add boilerplate for clipboard handling 2018-10-24 14:03:08 +02:00
Ricardo Vieira
92b3fd02e5 wayland: save serial from all input sources 2018-10-24 14:03:08 +02:00
Emmanuel Gil Peyrot
dcd2a19d90 Wayland: Add support for xdg-decoration
This allows compositors which prefer to draw the decorations around
clients to do so, rather than letting GLFW draw its own decorations.
The appearance is thus entirely subject to the compositor used, but
should generally be better than the current solid colour decorations we
have, which we continue to use when the compositor doesn’t support this
protocol or tells us to draw the decorations ourselves.

This new protocol has been tested against wlroots’s rootston compositor.

Fixes #1257.
2018-10-01 16:37:24 +02:00
Emmanuel Gil Peyrot
15cad02235 Wayland: Use HiDPI cursors for standard cursors 2018-09-11 14:28:44 +02:00
Emmanuel Gil Peyrot
321062833a Wayland: Load a bigger cursor theme for HiDPI 2018-09-11 14:28:44 +02:00
Emmanuel Gil Peyrot
5ea6e6cda2 Wayland: Add support for animated standard cursors 2018-09-09 13:12:20 +02:00
Emmanuel Gil Peyrot
dede6d6886 Wayland: Add a timerfd for animated cursors 2018-09-09 13:12:20 +02:00
Greg V
0a3c4f5d80 Add support for Wayland on FreeBSD and other OSes 2018-03-27 22:03:37 +02:00
Emmanuel Gil Peyrot
60e82ba472 Handle scaling factor (hidpi) correctly 2018-02-25 16:54:44 +01:00
Emmanuel Gil Peyrot
9f7ec6b094 Implement window decorations 2018-02-25 16:54:44 +01:00
Emmanuel Gil Peyrot
552e40a4be Add wl_subcompositor support 2018-02-25 16:54:44 +01:00
Emmanuel Gil Peyrot
79e16baca3 Add wp_viewporter support 2018-02-25 16:54:44 +01:00
Emmanuel Gil Peyrot
d6b9d00ceb Wayland: Handle monitor removal 2018-02-24 22:18:39 +01:00
Emmanuel Gil Peyrot
8bc0c5c2c0 Wayland: dlsym() xkb_keymap_key_repeats 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
Emmanuel Gil Peyrot
eb7c9994bf Prevent auto-iconify from firing on window creation 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
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
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
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
Emmanuel Gil Peyrot
65166858ff Wayland: Add support for the idle-inhibit protocol
Closes #955.
2017-11-20 22:27:37 +01:00
Emmanuel Gil Peyrot
d18431338a Wayland: Disable the compose key on old xkbcommon 2017-11-20 18:24:30 +01:00
Emmanuel Gil Peyrot
a7a70cf34d Wayland: Add dynamic loading of libxkbcommon 2017-10-30 12:01:17 +00:00
Emmanuel Gil Peyrot
95e282d5a0 Wayland: Add transparency support
Closes #788.
2017-10-01 01:39:27 +01:00
Camilla Löwy
a3007b9b0e Rename thread source files
This to reflect that they now contain more than TLS.
2017-06-08 16:09:14 +02:00
Camilla Löwy
372e908682 Remove internal header inclusion guards
Inclusion of internal headers is already both centralized and follows
strict rules.  Inclusion guards are both an unneccessary maintenance
burden and may hide inclusion order bugs.
2017-05-25 19:35:13 +02:00
Emmanuel Gil Peyrot
0e0862cfc7 Wayland: Fix broken build
Regression caused by e9560ef021.
2017-03-03 17:51:40 +00:00
Camilla Löwy
04f559e28d Restructure monitor enumeration
This way is both kinder on event-based enumeration and less work to
unwind allocations for when properly implementing GLFW_OUT_OF_MEMORY.
2017-01-02 06:03:02 +01:00
Emmanuel Gil Peyrot
046d281abc Wayland: Implement compose key for character input
This commit has been copied almost verbatim from Bryce Harrington’s
patch against Weston’s toytoolkit[1].  He gave his agreement to
relicense it under zlib[2].

[1] https://patchwork.freedesktop.org/patch/114661/
[2] https://github.com/glfw/glfw/pull/879#issuecomment-252988257
2016-10-16 13:51:59 +01:00
Emmanuel Gil Peyrot
a49601ba87 Wayland: Rename snake_case identifiers to camelCase for consistency 2016-10-12 14:13:52 +01:00
Camilla Berglund
e6a32db7b9 Cleanup 2016-09-07 16:49:29 +02:00
Camilla Berglund
f17d60da64 Add scancode arrays for Wayland and Mir
Related to #830.
2016-09-07 16:33:41 +02:00
Camilla Berglund
53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund
9a781cef53 Formatting 2016-06-15 01:35:07 +02:00
Camilla Berglund
ef80beab81 Add run-time context creation API selection
Fixes #145.
2016-05-04 17:00:07 +02:00
Emmanuel Gil Peyrot
e673bdc617 wayland: Implement maximized state 2016-05-02 21:49:27 +02:00
Emmanuel Gil Peyrot
5034c6c65e wayland: Handle hidden window as no shell surface 2016-05-02 21:47:21 +02:00
Jonas Ådahl
cb08dc574c wayland: Implement 'DISABLED' cursor mode
This implements support for the 'DISABLED' cursor mode, which
effectively means locking the pointer to the surface. The cursor is also
explicitly hidden.

This adds two new build dependencies: wayland-scanner and
wayland-protocols.

Closes #708.
2016-02-22 12:36:34 +01:00