Commit graph

115 commits

Author SHA1 Message Date
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
Jente Hidskes
7de253386c output: do not render an overlay for now
There are better ways to do this (i.e., custom shaders). We will get
back to this later.
2019-01-31 14:47:11 +01:00
Jente Hidskes
41d4ccfe44 xwayland: reintroduce XWayland workaround
This was temporarily removed when introducing proper view abstractions.
Now that we have the cg_xwayland_view struct, we reintroduce this
workaround in its proper place.

This also fixes the previous workaround, which checked whether a view
was *currently* mapped and not if it *has ever* been mapped.

See #18, #19 and 443d955dfd.
2019-01-31 14:47:11 +01:00
Jente Hidskes
7175100d0d view: reorder functions
It had gotten a bit messy. Now functions are grouped together (i.e.,
getters, queries, etc).
2019-01-31 14:47:11 +01:00
Jente Hidskes
64b971a665 view: add proper abstraction with interface 2019-01-31 14:47:11 +01:00
Jente Hidskes
24517922cc view: remove cg_ prefix 2019-01-31 14:47:11 +01:00
Jente Hidskes
f25460f365
xdg_shell/xwayland: include respective header 2019-01-25 20:34:11 +01:00
Jente Hidskes
e9139f08e3
xdg_shell/xwayland: unlink listeners on destroy 2019-01-25 16:27:51 +01:00
Jente Hidskes
2387bce647
output: remove mode link on destroy 2019-01-25 16:25:40 +01:00
Jente Hidskes
8db6b82c59
Suppport output transforms 2019-01-25 16:25:39 +01:00
Jente Hidskes
7379226bbe
seat: remove unused surface_commit listener 2019-01-25 16:25:39 +01:00