Commit Graph

22 Commits

Author SHA1 Message Date
Geoffrey McRae
3a8cb6a613 [client/common] fixes for issues detected through static analysis. 2022-03-07 10:14:52 +11:00
Geoffrey McRae
952ebea2c5 [all] refresh copyright dates 2022-01-05 19:42:46 +11:00
SytheZN
12321a8880 [client] wayland: implement resizing for libdecor 2021-10-14 18:17:00 +11:00
Tudor Brindus
14ad83c6b8 [client] use variable-relative sizeof where possible 2021-08-16 16:22:55 +10:00
Quantum
7cd0c55847 [client] wayland: support high DPI cursors when needed 2021-08-15 09:49:38 +10:00
Geoffrey McRae
6e7f39edee [client] app: allow selective full invalidation
Overlays only need to trigger a new frame if they have changed and not
full window invalidation, this change allows for this.
2021-08-05 06:47:36 +10:00
Quantum
51b9cd4e5a [all] copyright: use unicode copyright sign ©
This is done for consistency with the license strings in appstrings.c.
2021-08-04 21:16:35 +10:00
Geoffrey McRae
c15d0dc672 [client] ds: waitFrame now returns a bool to force rendering if needed
X11 needs to calibrate to get the best possible latency, as such it
needs the scene to render so that the render time of the scene can be
accounted for in the delay calculation.
2021-08-04 06:49:35 +10:00
Quantum
8d78a5aa95 [commit] wayland: invalidate window on scale changes
This makes it not require new frames for new scale to be properly applied.
2021-08-03 00:57:04 +10:00
Quantum
f08e2ece93 [client] wayland: implement stopWaitFrame 2021-08-01 19:54:28 +10:00
Quantum
2e4614cbc4 [client] wayland: make waitFrame work when not rendering
Implement skipFrame and do various things to wake waitFrame.
2021-08-01 18:54:55 +10:00
Quantum
77b3d45e0e [client] ds: change signalNextFrame to waitFrame 2021-08-01 17:29:15 +10:00
Quantum
b3ca872cef [client] wayland: improve fractional scale handling
Currently, we scale the desktop up to the next largest integer, and rely on
the wayland compositor to scale it back down to the correct size.
This is obviously undesirable.

In this commit, we attempt to detect the actual fractional scaling by finding
the current active mode in wl_output, and dividing it by the logical screen
size reported by xdg_output, taking into consideration screen rotation.

We then use wp_viewporter to set the exact buffer and viewport sizes if
fractional scaling is needed.
2021-08-01 13:05:41 +10:00
Quantum
a213ee960a [client] wayland: implement signalNextFrame with frame callbacks 2021-07-31 19:05:21 +10:00
Quantum
24d0aa0c18 [all] normalize copyright on all source files 2021-06-06 11:53:05 +10:00
Quantum
e70cfd84fb [client] egl: use eglSwapBuffersWithDamageKHR for cursor-only updates
Instead of damaging the entire surface when rendering a cursor move,
we can use the EGL_KHR_swap_buffers_with_damage extension to only
damage the part of the window covered by the cursor. This should
reduce the cursor movement latency on Wayland.
2021-05-19 18:56:36 +10:00
Quantum
4031a862df [client] wayland: split xdg-shell handling into a module
This will allow libdecor to be added as a new pseudo-shell.
2021-03-15 10:54:35 +11:00
Tudor Brindus
97009027d1 [client] wayland: require wl_compositor v3 instead of v4
The only addition to v4 was `wl_surface_damage_buffer`, which we do not
use.

This change should allow running on more compositors (even though v4 is
already old -- 5 years now).

Ref
3384f69ecf.
2021-02-27 14:48:40 +11:00
Quantum
798a1aadb5 [client] wayland: fail gracefully when interfaces are too old
Before, we just attempt to bind, causing an obscure Wayland error.
This commit checks the interface versions and print better error
messages.
2021-02-26 09:43:38 +11:00
Quantum
389d8824e2 [client] wayland: handle output scale changes
If the scale factor of an wl_output changes while the client is running,
the maximum scale factor is not updated. This may result in incorrect
scaling.

Therefore, when the scale factor is changed, we should generate a
resize event.
2021-02-23 20:28:25 +11:00
Quantum
447aedc9a3 [client] wayland: pass scale factor information to renderer 2021-02-21 19:06:53 +11:00
Quantum
5649d1ad95 [client] wayland: split Wayland display server into modules
The Wayland display server is getting unwieldy due to the sheer size.
To make it easier to edit in the future, I split it into many components
based on logical boundaries.
2021-02-21 10:31:49 +11:00