Commit Graph

2383 Commits

Author SHA1 Message Date
Geoffrey McRae
2d470b8deb [client] x11: filter out virtual/grabbed XIEnterEvents 2021-08-19 21:29:03 +10:00
Quantum
9aa0d3ddab [client] egl: fix context creation on EGL 1.4
EGL_CONTEXT_OPENGL_DEBUG is only defined in EGL 1.5, and therefore, we should
not be passing it on older versions of EGL.
2021-08-19 21:28:56 +10:00
Quantum
429620c48b [client] egl: dynamically import glBufferStorageEXT
On some implementations (e.g. llvmpipe), the function can only be queried via
eglGetProcAddress.
2021-08-19 21:28:45 +10:00
Quantum
5a906131eb [all] cmake: tell users to clone submodules when they haven't
This gives users a command to run that will automagically fix the submodule
situation, and should reduce the amount of support requests.
2021-08-19 21:28:36 +10:00
Quantum
1021c9ce92 [client] x11: implement keyboard modifiers 2021-08-19 21:28:21 +10:00
Quantum
ce3f11fd40 [client] x11: implement keyboard typing 2021-08-19 21:28:21 +10:00
Quantum
bb91b41c64 [client] egl: look at 3x3 around the pixel instead of 4x4
Using 4x4 means that some pixels will be outside of the lanczos window. The
ideal lanczos function should in fact be zero in those areas, so we shouldn't
waste time processing those pixels.

I can't notice any difference in the results.
2021-08-19 15:52:44 +10:00
Quantum
520460669c [client] egl: set gl_Position.z in cursor vertex shader 2021-08-19 12:24:55 +10:00
Quantum
1c7d14169e [client] kb: rename key code arrays from xfree86_* to linux_*
We are using Linux key codes defined in input-event-codes.h, not XFree86
stuff.
2021-08-17 19:08:07 +10:00
Quantum
ccda264648 [common] windebug: pass FORMAT_MESSAGE_IGNORE_INSERTS to FormatMessage
This avoids problems when the error message we are told to format contains
inserts like %1.

See https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353 for
details (or for fun).
2021-08-17 19:07:41 +10:00
Quantum
2ff32b230e [client] cmake: don't install cimgui.a into CMAKE_INSTALL_PREFIX 2021-08-16 20:02:43 +10:00
Quantum
2dbd4f168e [all] cmake: provide an uninstall target 2021-08-16 19:56:37 +10:00
Quantum
4ecf749f7e [host] remove all casts around malloc 2021-08-16 16:26:58 +10:00
Quantum
2de9e3e9be [common] remove all casts around malloc 2021-08-16 16:26:58 +10:00
Quantum
81c38e825c [client] remove all casts around malloc
The cast is unnecessary in C and should be removed to avoid clutter.
2021-08-16 16:26:58 +10:00
Quantum
fd4a4114e6 [client] egl: pad areas of the desktop repainted to cover overlays
We pad the screen coordinates and then convert to desktop coordinates,
so that the padding will always be a pixel wide on screen.
2021-08-16 16:26:18 +10:00
Quantum
cdda89cef7 [host] use correct argument order for calloc 2021-08-16 16:25:59 +10:00
Quantum
104141eec1 [client] use correct argument order for calloc 2021-08-16 16:25:59 +10:00
Quantum
4d907cecab [common] use correct argument order for calloc
The signature for calloc is void *calloc(size_t num, size_t size), where num
is the number of elements to allocate, and size is the size. Therefore, to
allocate a single struct, we should pass 1 for num and the size of the struct
as size.

In some places, we use the opposite order, and we should flip it.
2021-08-16 16:25:59 +10:00
Quantum
b7d3bbbd82 [client] egl: use standard-compliant way of EGL detection
According to the documentation for eglQueryString:

> EGL_BAD_DISPLAY is generated if display is not an EGL display connection,
> unless display is EGL_NO_DISPLAY and name is EGL_EXTENSIONS.

Therefore, we should check EGL by doing:

    eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)

Indeed, the old way of eglQueryString(EGL_NO_DISPLAY, EGL_VERSION) works on
libglvnd but not using mesa's libEGL.so directly.

Also added a warning to make it more obvious that EGL is not available.
2021-08-16 16:25:48 +10:00
Quantum
8a5efef622 [client] spice: avoid spice_key_modifiers when input is disabled 2021-08-16 16:25:11 +10:00
Tudor Brindus
14ad83c6b8 [client] use variable-relative sizeof where possible 2021-08-16 16:22:55 +10:00
Tudor Brindus
1c5620ba25 [common] use variable-relative sizeof where possible 2021-08-16 16:22:55 +10:00
Tudor Brindus
982b4e6625 [host] use variable-relative sizeof where possible 2021-08-16 16:22:55 +10:00
Quantum
c3f7327187 [obs] display DMABUF option but disable it on older OBS
This allows users to be aware that the option exists and they should upgrade.
2021-08-15 18:01:15 +10:00
Quantum
8f5afe1848 [client] egl: clamp sharpness settings in filters
While the slider does not allow you to get out of range by dragging,
the user could still type in out of range values, so we clamp the values.
2021-08-15 18:01:03 +10:00
Quantum
36073586e7 [client] egl: add tooltip about Ctrl+Click on sharpness sliders
With the new keymap feature, we are now able to properly support letting
the user enter exact values into the sliders. This commit adds a tooltip
to help the user discover this feature.

Note that this currently only works on Wayland. The X11 backend will need
to call app_handleKeyboardModifiers.
2021-08-15 18:01:03 +10:00
Quantum
c89518ead4 [common] option: use isspace from <ctype.h> 2021-08-15 18:00:52 +10:00
Quantum
7cd0c55847 [client] wayland: support high DPI cursors when needed 2021-08-15 09:49:38 +10:00
Quantum
2dd1ad53f8 [client] wayland: respect XCURSOR_THEME and XCURSOR_SIZE env variables 2021-08-15 09:46:55 +10:00
Quantum
d35c448058 [client] wayland: set keyboard LED state when changed 2021-08-15 09:46:31 +10:00
Quantum
3a00277e93 [client] spice: add ability to set keyboard LED state in guest
FIXME: update PureSpice
2021-08-15 09:46:31 +10:00
Geoffrey McRae
0f6f89fa5b [client] update PureSpice submodule 2021-08-15 09:42:03 +10:00
Quantum
bbd173000f [client] egl: clamp downscale factor range 2021-08-14 14:57:33 +10:00
Quantum
5b2fce0830 [client] ci: add libxkbcommon-dev dependency 2021-08-14 14:47:00 +10:00
Quantum
96738ab9d0 [client] egl: make downscale filter use text input widget
The major/minor pixel size hack is too confusing. This commit replaces
that with a text input and a slider.
2021-08-14 14:44:26 +10:00
Quantum
7045760490 [client] wayland: add keyboard typing handling with xkbcommon 2021-08-14 14:44:26 +10:00
Quantum
9414449408 [client] app: add ability to receive keyboard typing in overlays 2021-08-14 14:44:26 +10:00
Quantum
5f3bd778c0 [client] egl: add debug prints for renderStartup errors 2021-08-14 12:20:12 +10:00
Quantum
f66486b0c7 [client] egl/downscale: implement filter switching 2021-08-14 12:19:50 +10:00
Quantum
2c02e6c4a0 [client] egl: add linear downscale filter shader 2021-08-14 12:19:50 +10:00
Quantum
94de061587 [client] egl: implement lanczos filter shader 2021-08-14 12:19:50 +10:00
Quantum
16adbab5d4 [client] all: remove needless initalization 2021-08-14 12:19:07 +10:00
Quantum
579f998519 [client] all: replace assert with DEBUG_ASSERT 2021-08-14 12:19:07 +10:00
Quantum
85a96d1e06 [client] all: use DEBUG_UNREACHABLE instead of assert
Due to the way assert is defined in standard C, compilers in release mode
will not treat it as unreachable. This explains a lot about those pesky
uninitialized variable bugs, actually.
2021-08-14 12:19:07 +10:00
Quantum
b2630024a7 [common] all: switch asserts to DEBUG_ASSERT 2021-08-14 12:19:07 +10:00
Quantum
4f7ce91e7f [host] capture: switch all asserts to DEBUG_ASSERT 2021-08-14 12:19:07 +10:00
Quantum
a9241f6710 [common] debug: add DEBUG_UNREACHABLE() macro
This lets us mark code as unreachable and signals the compiler that this
is the case with __builtin_unreachable().

We also mark DEBUG_FATAL as unreachable.
2021-08-14 12:19:07 +10:00
Quantum
be1306f91a [common] debug: add DEBUG_ASSERT macro
This, unlike the standard assert macro, is guaranteed to print the failed
assertion to our log file, and tests the assertion even with NDEBUG defined
so we can more easily catch failures in production binaries without crashing
the program.

The motivation of this is how MinGW handles assertion failures: it creates a
dialog window that the headless user will not be able to see, and blocks the
program from being restarted by the service. Since the failed assertion is
displayed in the dialog, it doesn't print anything to the log, making it
impossible to diagnose issues.
2021-08-14 12:19:07 +10:00
Quantum
10ee6cd031 [host] nvfbc: read nvfbc:diffRes option with the correct type 2021-08-14 09:21:34 +10:00