Commit Graph

280 Commits

Author SHA1 Message Date
Geoffrey McRae
20972cfd9b [client] cmake: move X11 config directives to displayservers 2024-03-13 11:17:25 +11:00
Geoffrey McRae
0b210a280d [all] update the copyright to 2024 2024-02-01 17:16:31 +11:00
Geoffrey McRae
c2237f29ae [client] x11: fix typo
Closes #1105
2024-01-02 08:51:13 +11:00
Tudor Brindus
e5a9c0242f [client] wayland: libdecor maximize request should maximize, not minimize 2023-12-24 15:30:19 +11:00
Quantum
537218d6ae [client] wayland: honour fullscreen and maximize in libdecor
We never added the functionality when the parameters were passed to
libdecor_shellInit.
2023-12-22 14:08:48 +11:00
Geoffrey McRae
8cd002f1b2 [client] x11: fix incorrect pointer reference, fixes clipboard
Thanks to @JJRcop for bisecting to discover the fault
2023-12-01 09:12:38 +11:00
Geoffrey McRae
cf51503a54 [client] X11/i3: write directly into sun_path to avoid strncpy 2023-11-11 13:48:41 +11:00
Geoffrey McRae
b70811dcb9 [client] x11: pass large struct by reference 2023-11-11 13:48:41 +11:00
Geoffrey McRae
3c1405719c [client] wayland: fix use after free bugs 2023-11-11 13:48:41 +11:00
Geoffrey McRae
f6befb4567 [client] wayland: formatting 2023-11-11 13:48:41 +11:00
Geoffrey McRae
a2443cf926 [client] wayland: libdecor is not a requirement of building 2023-11-10 06:28:06 +11:00
Geoffrey McRae
138a0aee53 [all] update cmake minimum version 2023-11-10 06:28:05 +11:00
Geoffrey McRae
174b51b144 [client] wayland: add additional debug output 2023-11-10 06:28:05 +11:00
Geoffrey McRae
aa9dbe654d [client] wayland: move libdecor and xdg into seperate backends
This allows us to build with libdecor enabled as the selection to use it
is decided upon at runtime if the compositor `gnome-shell` is detected.
If the libdecor development headers are installed, by default it will
now be compiled in unless overridden by the user at compile time.
2023-11-10 06:28:05 +11:00
Geoffrey McRae
2e515657dd [all] update/add license headers 2023-10-20 15:36:34 +11:00
Geoffrey McRae
e658c2e0a2 [client] x11: change to a more visible "dot" cursor
This change alters the small square dot cursor to a more visible 16x16
cursor for X11. A new option `spice:largeDotCursor` can be set to use an
alternative 32x32 cursor for the vision impaired.
2023-09-13 21:54:31 +10:00
Geoffrey McRae
82607a7d6f [client] x11: read the i3 IPC response 2023-09-12 02:03:24 +10:00
Geoffrey McRae
24d4fce17c [client] x11: add support for i3 global full screen toggle
This commit adds an interface to the X11 display server code to support
various window manage specific features, such as in this case, the i3
global full screen toggle.

This feature specifically uses the i3 IPC to cause looking glass to go
full screen across all monitors if the new option `i3:globalFullScreen`
is enabled.
2023-09-12 01:19:06 +10:00
Geoffrey McRae
8dba4b6c0b [client] x11: fix cleanup if XIQueryVersion fails 2023-09-11 23:41:52 +10:00
Geoffrey McRae
894b8b0c22 [client] x11: generate synthetic EnterNotify event on cursor leave
If the cursor was grabbed the window the cursor moves over when it is
ungrabbed will recieve an EnterNotify event with the mode of
NotifyUngrab, unfortunatly some window manages such as i3 will ignore
this message and as such focus follows mouse will not function
correctly. This patch injects a normal EnterNotify to work around this
issue.
2023-03-05 16:42:47 +11:00
Geoffrey McRae
2f48798db9 [client] wayland: check for failure of wl_display_connect 2023-02-28 23:38:44 +11:00
Geoffrey McRae
6f8e6f9a19 [client] x11: catch and print details of X11 errors with a backtrace 2023-01-05 17:33:01 +11:00
Quantum
60ac03ebaf [client] wayland: implement window size setting for xdg-shell
This should allow win:autoResize to work on Wayland when the compositor
supports such an operation.
2022-12-08 21:08:33 +11:00
Ali Abdel-Qader
352cd2fafe [client] remove non-prototype function declarations
With -Wstrict-prototypes on non-protyped functions are deprecated and
functions must include a void parameter if they do not take parameters.
2022-11-01 08:03:15 +11:00
Quantum
d9ffb98c9b [client] wayland: fix attempt to confine when pointer is locked
This fixes the following crash when attempt to toggle capture at the
right after closing the overlay:

    zwp_pointer_constraints_v1@12: error 1: a pointer constraint with a wl_pointer of the same wl_seat is already on this surface
2022-09-19 14:58:27 +10:00
Geoffrey McRae
5385853f3f [client] x11: set _NET_WM_PID
Fixes #1013
2022-09-18 10:10:13 +10:00
Quantum
f5e68711d0 [client] wayland: handle wl_data_source.target action
There is no action to be taken by the Looking Glass client, but a
handler needs to exist as certain other Wayland clients chooses to
send this message for copy-paste operations despite the fact it's
supposed to be used for drag-and-drop negotiation.
2022-08-14 12:05:51 +10:00
Quantum
0dabfdc432 [client] displayservers: add name field 2022-07-13 07:05:07 +10:00
Geoffrey McRae
9a9f9d433e [client] x11: add dependency on xkbcommon 2022-06-30 15:09:24 +10:00
Quantum
d24459b27f [client] wayland: correctly convert scan codes to numbers
Note that xkb scan code = linux scan code + 8.
2022-06-30 08:38:29 +10:00
Geoffrey McRae
da04a6dd54 [client] all: use the defined keyboard mapping for keybinds
Fixes #1007
2022-06-29 18:26:40 +10:00
Quantum
8b68a96ee1 [client] wayland: fix infinite resize loop
The intention has been to keep wlWm.needsResize true when skipping
resize, but I accidentally negated the value.
2022-06-01 22:41:20 -04:00
Quantum
20d459d113 [client] wayland: deal getting scale before size
Certain window managers give us a scale before it gives us a size.
This commit makes the Wayland backend avoid passing a zero size to
wp_viewport_set_source, which is a protocol error.
2022-05-29 14:52:58 +10:00
Quantum
a8521b821e [all] cmake: standardize indentation to 2 spaces 2022-05-29 11:16:16 +10:00
Geoffrey McRae
d7704b13c0 [client] x11: set window posision before entering fullscreen
This fixes an issue where the window position would be ignored if the
application was launched in full screen mode from the command line
causing the client to enter full screen on the wrong monitor in
multi-monitor configurations.
2022-05-15 20:41:06 +10:00
Geoffrey McRae
3b55ac5420 [client] x11: check for null data from XGetWindowProperty
This fixes a reported segfault when a window manager fails to provide
valid EWMH values.

Fixes #987
2022-05-15 16:38:17 +10:00
Geoffrey McRae
3a8cb6a613 [client/common] fixes for issues detected through static analysis. 2022-03-07 10:14:52 +11:00
Shootfast
48cf099638 [client] input: fix confine_pointer argument marshalling
Under Wayland, if the mouse pointer is disconnected whilst captured
(like say via KVM switch), the waylandWarpPointer code will be called
but the pointer will be NULL. This results in the cryptic message:

error marshalling arguments for confine_pointer (signature noo?ou): null value passed for arg 2
Error marshalling request: Invalid argument

This patch adds a check on the wlWm.pointer pointer before attempting
to warp the pointer, and avoids the crash.
2022-03-05 09:33:45 +11:00
Tudor Brindus
91d6e3a82a [client] allow building with -Wstrict-prototypes
This is not yet turned on because cimgui does not build with it enabled.
2022-02-25 20:38:44 +11:00
Geoffrey McRae
29698362ed [client] x11: added request activation support 2022-02-10 20:20:34 +11:00
Geoffrey McRae
f24db8d0cd Revert "[client] x11: check if the EWMH atoms exist before using them"
This reverts commit cfd2e6ff32.
2022-02-10 13:36:40 +11:00
Geoffrey McRae
cfd2e6ff32 [client] x11: check if the EWMH atoms exist before using them 2022-02-10 13:35:19 +11:00
Netboy3
e0c0451b52 [client] x11: Add inline icon
Many X11 window managers will present an application on their
taskbar as a combination of the application name and an icon
imagery pulled from the X-Property _NET_WM_ICON. Applications
built under frameworks such as Qt or GTK have this property
populated by the framework. This commit adds the Atom _NET_WM_ICON
and populates it with a 64x64 icon of Looking Glass.
2022-02-09 12:07:55 +11:00
Tudor Brindus
e1ac838796 [client] wayland: use wayland-protocols from submodule 2022-02-08 16:05:51 +11:00
Tudor Brindus
969ac4d1d1 [client] wayland: activate our window if we're allowed 2022-02-08 14:54:55 +11:00
Tudor Brindus
da548e3858 [client] ds: expose activation requesting 2022-02-08 14:54:55 +11:00
Tudor Brindus
21a349343b [client] wayland: implement activation request 2022-02-08 14:54:55 +11:00
Tudor Brindus
4ee6bdf198 [client] wayland: bind xdg_activation_v1 when available 2022-02-08 14:54:55 +11:00
Tudor Brindus
b13582a911 [client] wayland: build xdg-activation-v1 header 2022-02-08 14:54:55 +11:00
Geoffrey McRae
05e363e009 [client] x11: cleanup duplicated code 2022-01-26 15:30:38 +11:00