Commit graph

268 commits

Author SHA1 Message Date
Jente Hidskes
d9f132ee5d layer-shell: initial layer shell v1 implementation 2021-12-23 18:53:11 +01:00
Jente Hidskes
ddead86366 output: set pointer to cg_output in wlr_output->data
This will be used later in the layer shell implementation.
2021-12-23 18:53:11 +01:00
Jente Hidskes
fc5cc401b7 view: position using the output's usable area 2021-12-23 18:53:11 +01:00
Jente Hidskes
dc090aa517 output: add usable area
This area will be defined by the layer shell surfaces, as the total
output layout area minus areas occupied by layer shell surfaces.

It is meant for layer shell surfaces to reserve space that will not be
used for views, such as a status bar.
2021-12-23 18:52:34 +01:00
Jente Hidskes
c3a3539080 output: add list of layers 2021-12-23 18:52:34 +01:00
Jente Hidskes
1ea91900d9 Add initial layer shell skeleton 2021-12-23 18:51:39 +01:00
Jente Hidskes
1262e1b55e Add wlr-layer-shell-unstable-v1 protocol 2021-12-23 18:51:04 +01:00
Dima Krasner
3321daef98 fall back to a lower output mode if needed (swaywm/sway@4cdc4ac) 2021-12-22 07:36:43 +01:00
Dima Krasner
f44ba0cea2 use find_library() for libm 2021-12-22 07:19:26 +01:00
Dima Krasner
0e87c2c8d8 restore direct libm dependency (fixes #222) 2021-12-22 07:09:09 +01:00
lunacb
de03250ca0 fixed typo 2021-12-21 21:56:56 +01:00
Jente Hidskes
dfba2d8f9d Remove no longer needed dependencies 2021-12-21 21:53:28 +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
77a3f6bb0c Use wlr_scene_output_send_frame_done 2021-12-21 21:53:28 +01:00
Simon Ser
7a7325c0ee Drop cg_view_child
This is now unused.
2021-12-21 21:53:28 +01:00
Simon Ser
79950cd691 Use wlr_scene_xdg_surface_create for popups
See https://github.com/swaywm/wlroots/pull/3298
2021-12-21 21:53:28 +01:00
Simon Ser
af610192f4 Use wlr_scene_output_for_each_surface 2021-12-21 21:53:28 +01:00
Simon Ser
5a1933f660 Delegate direct scan-out to wlr_scene
Depends on [1].

[1]: https://github.com/swaywm/wlroots/pull/3279
2021-12-21 21:53:28 +01:00
Simon Ser
e6f89ed6f1 Remove output_for_each_surface
It's used only by send_frame_done. Instead of keeping a generic
iterator, let's inline it in the only user.
2021-12-21 21:53:28 +01:00
Simon Ser
48b31afb5a Drop unused output_surface_for_each_surface 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
128fa90ea1 Use scene-graph helpers for sub-surfaces
Delegate sub-surface handling to wlr_scene_surface_tree_create.

References: https://github.com/swaywm/wlroots/pull/3128
2021-12-21 21:53:28 +01:00
Simon Ser
fb3dc58237 Replace view_wlr_surface_at with scene-graph 2021-12-21 21:53:28 +01:00
Simon Ser
6d60c6c464 Drop view_for_each_surface and view_for_each_popup_surface
With the scene-graph, these are no longer used.
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
Jente Hidskes
388d60d6b8 Tune compiler options 2021-12-19 11:12:19 +01:00
Jente Hidskes
8385b62a9b Move to GitHub actions 2021-12-19 11:12:19 +01:00
Palanix
d1367b1c46 removed focus_changed logic 2021-09-06 16:09:14 +02:00
Palanix
0ba1c40aa6 fix drag 2021-09-06 16:09:14 +02:00
Lorenz Brun
60492959a7 Set xdg_toplevel geometry for fullscreen clients 2021-09-06 15:46:09 +02:00
Simon Ser
b21f9c6322 Fix count_surface_iterator
This increments the pointer value, not the actual count.

References: https://github.com/Hjdskes/cage/issues/176
2021-08-11 12:54:49 +02:00
Simon Ser
1a3ab3eb3a build: allow using subproject for wlroots
This is handy when testing cage with a newer wlroots copy, or
when developing cage and wlroots patches in parallel.
2021-08-09 20:54:11 +02:00
Simon Ser
5424a35aba Damage drag icon when destroyed
This fixes the drag icon not disappearing when releasing the
pointer button.

Reproduction steps:

- Open gedit
- Drag some text around
- Release the pointer button
2021-08-09 20:53:24 +02:00
Simon Ser
cdb1cdf3b4 Don't manually parse XKB_* env vars
libxkbcommon will do it for us if we provide a NULL struct
xkb_rule_names.
2021-08-09 20:52:51 +02:00
Jente Hidskes
646b3e80b4 Update version to 0.1.4 2021-06-26 09:39:40 +02:00
Jan Beich
08e58c2b45 CI: bump wlroots version to 0.14.0 2021-06-26 09:25:36 +02:00
Jan Beich
636185bf9c meson: require wlroots 0.14.0 after 9a4523d47e
view.c:238:52: error: no member named 'subsurfaces_below' in 'struct wlr_surface'
        wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces_below, parent_link) {
                                       ~~~~~~~~~~~~~~~~~  ^
/usr/include/wayland-util.h:443:30: note: expanded from macro 'wl_list_for_each'
        for (pos = wl_container_of((head)->next, pos, member);  \
                                    ^~~~
/usr/include/wayland-util.h:409:32: note: expanded from macro 'wl_container_of'
        (__typeof__(sample))((char *)(ptr) -                            \
                                      ^~~
2021-06-26 09:25:36 +02:00
Jan Beich
851268bedc view: chase swaywm/wlroots@9e58301df7
view.c:238:52: error: no member named 'subsurfaces' in 'struct wlr_surface'
        wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces, parent_link) {
                                       ~~~~~~~~~~~~~~~~~  ^
/usr/include/wayland-util.h:443:30: note: expanded from macro 'wl_list_for_each'
        for (pos = wl_container_of((head)->next, pos, member);  \
                                    ^~~~
/usr/include/wayland-util.h:409:32: note: expanded from macro 'wl_container_of'
        (__typeof__(sample))((char *)(ptr) -                            \
                                      ^~~

Based on 3162766eef
2021-06-26 09:25:36 +02:00
Jente Hidskes
efaf76e9ab Include release scripts 2021-04-16 14:34:57 +02:00
Jente Hidskes
aa91af32a5 Update version to 0.1.3 2021-04-16 14:01:38 +02:00
Jan Beich
0891f4b814 CI: bump wlroots version to 0.13.0 2021-04-09 19:33:14 +02:00
Jan Beich
b07647fb78 CI: explicitly depend on Mesa on Arch Linux
meson.build:102:0: ERROR: Dependency "egl" not found, tried pkgconfig
2021-04-09 19:33:14 +02:00
Jan Beich
40fc92f7e7 CI: chase swaywm/wlroots@de5347d0f2
Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
Message: Required for Xwayland support.
2021-04-09 19:33:14 +02:00
Jan Beich
cb93785649 CI: chase swaywm/wlroots@3504bb587d + swaywm/wlroots@e8ad05913f
meson.build:70:4: ERROR: Problem encountered: Cannot build Cage with XWayland support: wlroots has been built without it
2021-04-09 19:33:14 +02:00
Jan Beich
eb18383e8e meson: require wlroots 0.13.0 after 0db62672a4
cage.c:307:59: error: too few arguments to function call, expected 2, have 1
        server.backend = wlr_backend_autocreate(server.wl_display);
                         ~~~~~~~~~~~~~~~~~~~~~~                  ^
subprojects/wlroots/include/wlr/backend.h:43:21: note: 'wlr_backend_autocreate' declared here
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
                    ^
2021-04-09 19:33:14 +02:00
Jan Beich
a5aa497ff1 output: chase swaywm/wlroots@cc56b4f073
output.c:456:36: error: no member named 'transform' in 'struct wlr_output::(anonymous at /usr/local/include/wlr/types/wlr_output.h:154:2)'
        wl_signal_add(&wlr_output->events.transform, &output->transform);
                       ~~~~~~~~~~~~~~~~~~ ^

Based on 2c76923282
2021-04-09 19:33:14 +02:00
Jan Beich
82bad3f0fc xdg_shell: chase swaywm/wlroots@07111828c5
xdg_shell.c:230:2: warning: implicit declaration of function 'wlr_xdg_surface_for_each_popup' is invalid in C99 [-Wimplicit-function-declaration]
        wlr_xdg_surface_for_each_popup(xdg_shell_view->xdg_surface, iterator, data);
        ^
ld: error: undefined symbol: wlr_xdg_surface_for_each_popup
>>> referenced by xdg_shell.c:230 (../xdg_shell.c:230)
>>>               cage.p/xdg_shell.c.o:(for_each_popup)

Based on 5438cc158a
2021-04-09 19:33:14 +02:00