Commit graph

45 commits

Author SHA1 Message Date
Jente Hidskes
90498e85d5 Cage: print the correct variable 2019-04-22 18:43:19 +02:00
Tristan Daniel
9e6a5ad44f Cage: implement output transform
This commit adds the command line switch -r, which rotates the output 90
degrees clockwise and can be specified up to three times.
2019-04-14 08:31:33 +02:00
Jente Hidskes
69872baead
Cage: encapsulate debug specific behavior 2019-03-23 20:18:37 +01:00
Jente Hidskes
78fc6fbe0d
Cage: fix previous commit 2019-03-23 20:18:13 +01:00
Jente Hidskes
d855ea6718
Cage: update for wlroots 0.5.0 2019-03-23 16:42:31 +01:00
Jente Hidskes
848929c88c
Cage: exit when there is no application passed
This regression was introduced in 667667505a
due to wrongfully handling optind.
2019-02-26 18:56:23 +01:00
Jente Hidskes
b758e421cb Cage: bail when there is no xdg decoration manager 2019-02-24 00:29:22 +01:00
Jente Hidskes
cd0c51814f Cage: implement server-decoration protocol
GTK still uses the (now deprecated) server-decoration protocol, which is
the predecessor to xdg-decoration. Hence, with this commit Cage now also
hides decorations on applications such as Firefox.

Fixes #47, see also
https://github.com/Hjdskes/cage/pull/45#issuecomment-466402865.
2019-02-24 00:29:22 +01:00
Jente Hidskes
1c5cbe6de0
Cage: don't destroy wlr_backend manually
The backend gets destroyed automatically when the wl_display is
destroyed, so we're getting a use-after-free when we do this ourselves
again.

Fixes #44
2019-02-23 19:49:01 +01:00
Jente Hidskes
65f7107078
cage: fix signal handler event source memory leaks 2019-02-21 11:38:30 +01:00
Jente Hidskes
2166fbdcfb Implement xdg-decoration
This commit adds a commandline switch (-d) to disable client side
decorations, if possible. In this case, Cage will not draw any
decorations of its own, in order to maximize screen real estate.

The default behavior remains the same, i.e., if -d is not passed,
clients will draw their client side decorations, if any.

Fixes #32
2019-02-21 09:14:59 +01:00
Jente Hidskes
996f641cf0
Cage: reset signal mask after forking
Cage uses wl_event_loop_add_signal to handle SIGINT and SIGTERM, which
masks these signals. This means that the subprocess spawned by Cage
start with these signals masked, which can lead to delays in Cage
shutting down on e.g. ^C. Hence, we now unmask all signals between fork
and exec.

Fixes #40
2019-02-17 21:14:31 +01:00
Jente Hidskes
9d825d6dc7
Move set_window_title to output 2019-02-16 00:56:09 +01:00
Jente Hidskes
667667505a Put damage tracking debugging behind a flag 2019-02-16 00:35:17 +01:00
Jente Hidskes
f0eb115bda
seat: remove cg_ prefix from cg_seat_destroy 2019-02-02 17:13:10 +01:00
Jente Hidskes
fd5175cbf8 seat: remove cg_ prefix 2019-01-31 14:47:11 +01:00
Jente Hidskes
6ebc684ee6
cage: free window title 2019-01-25 09:02:38 +01:00
Jente Hidskes
c00ac5c462 Set Cage's window title to toplevel's title
When using the Wayland or X11 backend, Cage is drawn inside a window.
This commit sets this window's title to that of the currently focused
toplevel window inside Cage.

Fixes #29.
2019-01-24 16:15:03 +01:00
Jente Hidskes
5deb7776fc
Cage: destroy XWayland before clients
This is the order in which it should be done.
2019-01-18 13:29:30 +01:00
Jente Hidskes
9b797fb98e
Cage: move xwayland check 2019-01-17 22:25:20 +01:00
Jente Hidskes
2c5b3c5ad0
Cage: add debug print for Wayland socket 2019-01-17 21:46:43 +01:00
Jente Hidskes
21c01c9ee0 Add idle inhibitor support
With this, some apps (e.g. mpv) can block the idle tracker from
kicking in. This way, the screen won't blank (or whatever you
configured) when the application doesn't want it to.
2019-01-09 20:05:09 +01:00
Jente Hidskes
bf58eadf50 Add idle tracking
Note that this does not do much without an idle manager "on the other
side". See, for example, swayidle: https://github.com/swaywm/sway/blob/master/swayidle/swayidle.1.scd

Fixes #7.
2019-01-09 20:05:09 +01:00
Jente Hidskes
96372c145f
cage.c: fix include order 2019-01-04 20:23:50 +01:00
Jente Hidskes
81761cae96
Cage: fix possibly uninitialized variable 2019-01-03 13:55:38 +01:00
Jente Hidskes
e721808c88
Update copyright to include 2019 2019-01-02 21:01:01 +01:00
Jente Hidskes
a34c726a1c
Add XWayland support
With Cage becoming more popular since its mention on Phoronix and
therefore getting more use-cases than just my own project, add XWayland
support. The refactoring of 2cf40f7 makes this much easier. Note that
this is a no-cost addition for those of us not using XWayland as it is a
compile-time option that needs to be explicitly enabled by adding
`-Dxwayland=true` to your meson command.
2019-01-02 20:58:48 +01:00
Jente Hidskes
2cf40f7a9b
Refactor cage into separate source files
This makes Cage much easier to maintain. Not only is it easier where to
look and to maintain a mental model of the code, there is also more
encapsulation, better abstractions and better extendability.
2018-12-31 00:12:33 +01:00
Jente Hidskes
e1525a20c8
Do not create a dmabuf global
In new enough wlroots versions, the renderer creates the dmabuf global
itself.

Fixes #11.
2018-12-28 15:32:07 +01:00
Jente Hidskes
f680ee02db
Fix possibly uninitialized variable warning 2018-12-25 20:29:24 +01:00
Jente Hidskes
4ea5cc6b32
Use Wayland's event loop for signals
Now we don't require a global variable.
2018-12-25 20:29:24 +01:00
Jente Hidskes
b22f4b465c
Improve child spawning 2018-12-25 20:29:24 +01:00
Jente Hidskes
96fd0e13bb
Add error handling 2018-12-25 20:29:24 +01:00
Jente Hidskes
3be28b5b6d
Remove unmap support
Since we do not ever minimize or otherwise unmap clients (except when
destroying them), we don't need to track mapped/unmapped state. The
destroy case is captured in checking whether the surface has a buffer
attached to it, before requesting its texture.
2018-12-25 20:29:24 +01:00
Jente Hidskes
11e71dbfb5
Make dialogs modal
That is, do not allow another view to get focus upon clicking a pointer
button.
2018-12-25 20:29:24 +01:00
Jente Hidskes
e68d76f403
Abstract fullscreen view away into a function 2018-12-25 20:29:23 +01:00
Jente Hidskes
0f3ce4a7d8
Remove renderer pointer from server struct 2018-12-25 20:29:23 +01:00
Jente Hidskes
1dcb6355ad
Make pointer visible on startup 2018-12-25 20:29:23 +01:00
Jente Hidskes
95372f3f37
Switch to Meson
This makes it easier to extend in the future. Also, it will make it
easier to add (un)install targets and eventually, distribute files such
as systemd services.
2018-12-25 20:29:23 +01:00
Jente Hidskes
429392ac63
Refactor desktop_view_at 2018-12-25 20:29:23 +01:00
Jente Hidskes
58a9f09617
Handle keyboard removal 2018-12-25 20:29:23 +01:00
Jente Hidskes
92ba822b10
Actually maximize the window.
It appears that wlr_xdg_toplevel_set_maximized does not actually change
the size of the surface. Rather, it only makes the surface think it is
maximized. Hence, we need to set the size to that of the output
manually.
2018-12-25 20:29:23 +01:00
Jente Hidskes
d819eedc62
Allow arguments to be passed to applications 2018-12-25 20:29:23 +01:00
Jente Hidskes
fda8e22d13
Remove support for multiple outputs
A kiosk is only ever attached to a single output.
2018-12-25 20:29:22 +01:00
Jente Hidskes
26d9917160
Initial commit 2018-12-25 20:29:22 +01:00