Simon Ser
2e593fe5a8
Fix renderer, allocator and scene memory leaks on exit
Continuous integration build / compile (clang, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / format (push) Has been cancelled
Continuous integration build / scan-build (push) Has been cancelled
2025-07-02 09:09:20 +02:00
Simon Ser
63f186632e
xdg_shell: bump to v5
...
Continuous integration build / compile (clang, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / format (push) Has been cancelled
Continuous integration build / scan-build (push) Has been cancelled
v5 adds the wm_capabilities event. cage only supports fullscreen.
2025-06-03 23:22:53 +02:00
Simon Ser
9ad44e4f52
Upgrade wlroots to v0.19
Continuous integration build / compile (clang, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (clang, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / scan-build (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, alpine:edge, enabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, disabled) (push) Has been cancelled
Continuous integration build / compile (gcc, archlinux:base-devel, enabled) (push) Has been cancelled
Continuous integration build / format (push) Has been cancelled
2025-05-26 23:09:43 +02:00
Simon Ser
6efb3b5042
cage: remove global server listeners on shutdown
2025-04-15 15:26:03 +02:00
Horror Proton
360e259ca5
Fix getopt("D")
2024-12-23 14:56:15 +01:00
Simon Ser
19157d3564
Make application arguments optional
...
If no application is specified, run without starting a child
process. Leave it up to the user to start applications externally
and stop cage with a signal.
2024-11-22 12:09:16 +01:00
Simon Ser
852839e59f
Add CLI flag to enable debug logs
...
For bug reports, it's useful to ask for a debug log. However there's
no way for users to enable debug logs without recompiling. Add a
CLI flag to do so.
2024-11-22 12:03:40 +01:00
Simon Ser
412c11ea91
cage: fix abort on shutdown
...
Workaround for [1]: register a listener for wl_display destroy and
avoid calling wl_display_terminate() after.
[1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/421
2024-09-07 23:42:24 +02:00
Simon Ser
874a4a1e79
xdg_shell: use new lifecycle events
2024-09-07 23:42:24 +02:00
Simon Ser
7cc49d2292
cage: drop wlr_scene_set_presentation()
...
Scene-graph will do the right thing without this call.
2024-09-07 23:42:24 +02:00
Simon Ser
b9add8b729
cage: create backend with wl_event_loop and output layout with wl_display
2024-09-07 23:42:24 +02:00
Simon Ser
eaeab71ffa
cage: fix SIGINT/SIGTERM handler data
...
server.wl_display is already a pointer.
Reported-by: Jonathan GUILLOT <jonathan@joggee.fr>
2024-08-28 12:03:10 +02:00
Simon Ser
e7d8780f46
Add support for primary selection
2024-02-26 16:41:17 +01:00
Kenny Levinsen
f0bc13bef7
output: Add scene output layout helper manually
2024-01-26 23:45:57 +01:00
Kenny Levinsen
1ff7945ba1
Switch from wlr_idle to wlr_idle_notify_v1
...
The latter implemented the KDE protocol which has been dropped.
2024-01-26 23:45:57 +01:00
Kenny Levinsen
a30f2bcec1
Use new wlr_compositor_create signature
2024-01-26 23:45:57 +01:00
Kenny Levinsen
624355485a
Use new wlr_backend_autocreate signature
...
The session is now stored explicitly, with wlr_backend_get_session being
dropped.
2024-01-26 23:45:57 +01:00
Simon Ser
34eb3ec2c8
Make Xwayland optional at runtime
...
Closes: https://github.com/cage-kiosk/cage/issues/293
2023-12-11 17:25:08 +01:00
Jonathan GUILLOT
d40dd3bd99
cage: remove not really used variables in server initialization
2023-11-10 14:38:28 +01:00
Jonathan GUILLOT
2ab480910e
cage: add relative-pointer-unstable-v1 support
2023-11-10 14:38:28 +01:00
Jonathan GUILLOT
efbf7c035b
seat: move initial cursor center to dedicated function
2023-11-10 14:38:28 +01:00
Jonathan GUILLOT
121e3ac8b2
cage: return exit code of primary client
...
Some applications indicate different shutdown conditions by returning
specific exit codes. One of these is e.g. Kodi, which returns 64 in case
the user chose "Power off" and 66 in case the user chose "Reboot".
In order to act on these exit codes, it thus makes sense in some
situations to pass them on from the primary client to the caller of
Cage.
This exit code is only returned if the primary client is the cause of
Cage terminating.
Co-authored-by: Patrick Steinhardt <ps@pks.im>
2023-08-21 14:40:05 +02:00
Simon Ser
8dcc901522
Log execvp() failures
...
Closes: https://github.com/cage-kiosk/cage/issues/255
2023-07-28 16:41:03 +02:00
Jonathan GUILLOT
6f78d9d5b2
cage: add basic wlr-output-management support
...
Co-authored-by: Dima Krasner <dima@dimakrasner.com>
2023-07-28 15:36:34 +02:00
Jente Hidskes
27b6971b36
cage: remove support for rotating outputs
...
This is now handled through wlr_output_management
2023-07-28 15:36:34 +02:00
ChemicalXandco
bd5b20e1fa
add wlr_virtual_keyboard_manager_v1 and wlr_virtual_pointer_manager_v1
2023-02-01 00:26:37 +01:00
Alexander Orzechowski
a8e4e3d131
Enable single-pixel-buffer
...
Why not.
2022-12-17 21:56:03 +01:00
Alexander Orzechowski
3015e0368b
Give xdg_shell a version
2022-12-17 21:56:03 +01:00
Alexander Orzechowski
979ff58a24
Port 0.16 wlr_output_layout_get_box changes
...
Fixes memory leaks.
2022-12-17 21:56:03 +01:00
Phil Jones
a57e0067c1
Explicitly create wlr_subcompositor.
...
Following wlroots b6f43ab2, the subcompositor must now be created
explicitly, rather than being handled by wlr_compositor_create.
2022-12-17 21:56:03 +01:00
Jan Beich
d3d4a129e7
cage: allow running as root when not using setuid bit
2022-12-14 11:46:48 +01:00
Simon Ser
7fe306a79a
Enable presentation-time
...
We get this for free with wlr_scene.
2021-12-21 21:53:28 +01:00
Simon Ser
36309d0c07
Enable viewporter
...
We get this for free with wlr_scene.
2021-12-21 21:53:28 +01:00
Simon Ser
0736d72e88
Use wlr_scene_attach_output_layout
...
This provides wlr_output_layout integration.
References: https://github.com/swaywm/wlroots/pull/3160
2021-12-21 21:53:28 +01:00
Simon Ser
d46e8a82dd
Use scene-graph for damage tracking
...
References: https://github.com/swaywm/wlroots/pull/3117
2021-12-21 21:53:28 +01:00
Simon Ser
f544483340
Use the wlroots scene-graph API
...
References: https://github.com/swaywm/wlroots/pull/1966
2021-12-21 21:53:28 +01:00
Simon Ser
395189fb05
Upgrade to wlroots 0.15
...
- Update wlr_box includes to util/box.h: the wlroots header has
been moved upstream.
- Subsurface fields have been moved
- Create renderer and allocator, stop using wlr_backend_get_renderer
- Initalize output rendering
2021-12-21 21:53:28 +01:00
Jan Beich
90da4ee4dc
cage: chase swaywm/wlroots@4b03bdc3ab
...
cage.c:307:61: error: too many arguments to function call, expected single argument 'display', have 2 arguments
server.backend = wlr_backend_autocreate(server.wl_display, NULL);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
/usr/local/include/wlr/backend.h:36:21: note: 'wlr_backend_autocreate' declared here
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display);
^
Based on 53f5197c26
2021-04-09 19:33:14 +02:00
Jente Hidskes
0d694db6fe
Invert wlr_xcursor_manager_load return value
2020-07-16 15:25:11 +02:00
Jan Tatje
79992f39f3
Add option to allow changing VT
...
Code that does the VT switch taken from sway.
2020-07-16 14:46:28 +02:00
Jente Hidskes
bd961db6f5
cage: allow setting output mode
2020-06-26 20:56:11 +02:00
Jente Hidskes
64299054db
output: add output_mode enum
...
This enum provides two means of behaviour for multi-output setups:
extend the display across all outputs, or only use the last one. The
former is the current (and default) behaviour; the latter will be added
in the next commit.
2020-06-26 20:56:11 +02:00
travankor
6eb693c05b
Cage: drop gid before uid ( #142 )
...
If setuid is called first then the target user may not have the ability to
setgid. See https://wiki.sei.cmu.edu/confluence/display/c/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
2020-04-17 21:58:26 +02:00
Jente Hidskes
27391f174a
Cage: check for sigchld_source being NULL before removing it
...
If something goes wrong during startup (i.e., the wlroots backend cannot
be created), we jump to the end. This then unconditionally removes the
sigchld_source, but that hasn't been set at this point yet.
2020-02-22 00:23:03 +01:00
Jente Hidskes
6cbc202662
Apply clang-format
2020-02-18 21:20:23 +01:00
Jente Hidskes
42782bda1d
server: remove backend pointer
2020-02-08 16:49:12 +01:00
Jente Hidskes
dc002acd20
cage: cleanup_primary_client when jumping to 'end'
...
With the new CLOEXEC setting, spawning the primary client
can fail *after* forking. In this case, the client process
has been forked and will need to be cleaned up.
In case something fails before pid has been set, it's set to 0.
From waitpid(2):
The value of pid can be:
0 meaning wait for any child process whose process group ID
is equal to that of the calling process at the time of the
call to waitpid().
That will be none in this case, and hence this won't block and is thus
safe.
2020-02-07 19:04:16 +01:00
Jente Hidskes
24cc576377
cage: set CLOEXEC on the file descriptors
...
As mentioned by @emersion:
By default, pipe creates FDs without the CLOEXEC flag set, which means
they will be leaked to any other child process spawned. Would be nice to
set the CLOEXEC flag to prevent the leak.
2020-02-07 19:04:16 +01:00
Jente Hidskes
009cca3fa9
cage: switch SIGCHLD handling for pipe
...
As explained in [1] and [2], SIGCHLD is a tricky signal to handle. A
pipe can be used to signal completion instead.
[1]: https://github.com/swaywm/wlroots/issues/2012#issuecomment-578908333
[2]: https://stackoverflow.com/questions/8976004/using-waitpid-or-sigaction/8976461#8976461
2020-02-07 19:04:16 +01:00
Jente Hidskes
6be4306b4d
cage: destroy output_layout after wl_display
...
wl_display will destroy the outputs, whose destroy handler will remove
them from the output layout. But by that point, the output layout has
already been destroyed.
2020-02-07 19:04:16 +01:00