Commit graph

175 commits

Author SHA1 Message Date
Jente Hidskes
b16fc7d780
output: use the output's preferred mode
On outputs that have modes, we need to set one before we can use it.  We
pick the preferred mode, or if this is not advertised, the last listed
mode. This mode is generally the mode with the highest resolution.

Fixes #10
2019-05-03 21:14:51 +02:00
Jente Hidskes
5af455a905
output: fix damage tracking debug mode
We want to damage the whole output in this mode. However if we overwrite
the damaged region after it's useless.

See
8b1220f5a3 (diff-95fe5e5b411cc64a5dc31e2b72669a0d)
2019-05-03 21:07:40 +02:00
Jente Hidskes
f23257d170 output: don't submit too much damage
See https://github.com/swaywm/wlroots/issues/1666#issue-436967396 and
the linked changes
https://github.com/swaywm/wlroots/pull/1668/files#diff-95fe5e5b411cc64a5dc31e2b72669a0d
2019-05-03 21:03:09 +02:00
Drew DeVault
9354781f32 Update to wlroots 0.6.0 2019-05-03 21:03:09 +02:00
Jente Hidskes
887c855a3b CI: use wlroots 0.6.0 2019-05-03 21:03:09 +02:00
Jan Beich
61894994f3
Cage: drop root on startup like Sway
wlroots may need setuid to run on DRM if built without (e)logind
support.
2019-05-01 13:38:19 +02:00
Jan Beich
3fb89563ae Switch to system epoll-shim.pc in FreeBSD build 2019-04-27 20:27:23 +02:00
Michael Vetter
c69d394bed Set version to 0.1
Since we now have a tag with 0.1 and also a release with that version
number was published on GitHub we should adjust the version in the meson
file too.
2019-04-24 21:18:12 +02:00
Jente Hidskes
2eb28ce216
README: set logo size in px 2019-04-24 21:01:50 +02:00
Jente Hidskes
fa5142e773
README: add logo and signed release note 2019-04-23 22:53:23 +02:00
Jente Hidskes
cf06e42687 CI: add a FreeBSD build on Sourcehut 2019-04-22 18:43:19 +02:00
Jente Hidskes
5bfedaf84f CI: add an Alpine Edge build on Sourcehut 2019-04-22 18:43:19 +02:00
Jente Hidskes
46441ff85a CI: add an Arch Linux build on Sourcehut 2019-04-22 18:43:19 +02:00
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
eee63b8001
meson: require wlroots >= 0.41.0 2019-02-28 19:26:07 +01:00
Drew DeVault
da62449c27 Update for wlroots 0.4 2019-02-28 19:24:43 +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
c2226da89b
README: document to build against wlroots tags
Fixes #52.
2019-02-26 18:33:50 +01:00
Jente Hidskes
b189f90465
meson: -Werror is already set in project() 2019-02-24 13:41:34 +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
1ef3843839 Wrap x11 backend features in wlroots' feature flag
Fixes #46
2019-02-23 23:05:54 +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
707cb2cdfc
seat: fix memory leak when explicitly destroying the seat 2019-02-21 11:35:43 +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
76e8be14d9 seat: listen on wlr_seat.events.request_set_selection and wlr_seat.events.request_set_primary_selection
This is now required with wlroots 0.3, see https://github.com/swaywm/wlroots/releases/tag/0.3
and https://github.com/swaywm/wlroots/pull/1402

Fixes #42.
2019-02-16 19:09:00 +01:00
Jente Hidskes
202f74f21a seat: listen on the wlr_cursor.frame event
This is now required with wlroots 0.3, see https://github.com/swaywm/wlroots/releases/tag/0.3
and https://github.com/swaywm/wlroots/pull/1503.
2019-02-16 19:09:00 +01:00
Jente Hidskes
9d825d6dc7
Move set_window_title to output 2019-02-16 00:56:09 +01:00
Jente Hidskes
2669c80803 Listen to fullscreen requests
Fixes #34.
2019-02-16 00:36:07 +01:00
Jente Hidskes
5a1da1baee output: optimize when drawing whole surface 2019-02-16 00:35:17 +01:00
Jente Hidskes
a114ddbbf3 Damage whole views on map and unmap 2019-02-16 00:35:17 +01:00
Jente Hidskes
1308c0ffc3 view: add function to damage whole view 2019-02-16 00:35:17 +01:00
Jente Hidskes
aa4b27ec20 xdg_shell: implement xdg_popup 2019-02-16 00:35:17 +01:00
Jente Hidskes
36670f02f3 view: implement subsurfaces 2019-02-16 00:35:17 +01:00
Jente Hidskes
667667505a Put damage tracking debugging behind a flag 2019-02-16 00:35:17 +01:00
Jente Hidskes
e981cb8a1c Implement damage tracking
Fixes #5.
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
75b0f832ed
xwayland: move override-redirect assignmend to map handler
Some surfaces set their coordinates only when they're mapped, such as
current Firefox's menu popup. Hence, we accomodate such clients.
2019-01-31 18:31:14 +01:00
Jente Hidskes
c47eb031c6
xwayland: abstract override-redirect behind function 2019-01-31 18:29:29 +01:00
Jente Hidskes
16ab37b706 view: don't position override-redirect windows
Override-redirect windows are meant to be ignored by the X server, at
least as far as position goes. Hence, we detect whether we're dealing
with such a window and consequently don't position it.

This makes, amongst others, Chromium's popup menus and dmenu appear on
the correct position and size.
2019-01-31 16:57:51 +01:00
Jente Hidskes
2543934055
view_get_title: add NULL check
Otherwise, we'll segfault:

0x00007ffff7c36715 in __strlen_avx2 () at /usr/lib/libc.so.6
0x000055555555ae00 in view_get_title (view=0x5555558403c0) at ../view.c:34
2019-01-31 16:21:25 +01:00
Jente Hidskes
a9a8f551e5
README: tinywl is now within wlroots 2019-01-31 14:49:01 +01:00
Jente Hidskes
fd5175cbf8 seat: remove cg_ prefix 2019-01-31 14:47:11 +01:00
Jente Hidskes
5c403edc0b view: replace view_has_children with view_is_transient_for
This is a much cleaner implementation but allows us to do the same
things.
2019-01-31 14:47:11 +01:00