Commit graph

18 commits

Author SHA1 Message Date
Consolatis
598ab9bcff src/layers.c: delay popup unconstrain until after first commit
Fixes: #1372
2024-02-25 11:49:03 +00:00
Tomi Ollila
7ad5200f2e includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers.

Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.

The double underscores were removed since according to C standard
those "are always reserved for any use".
2023-05-13 22:29:21 +01:00
Johan Malm
f01071e72c layer: remove wl_list layers[] from struct output
...and just use `struct wlr_scene_tree *layer_tree[]`
2022-12-29 23:18:08 +01:00
Johan Malm
e7346f71c0 include/layers.h: remove redundant struct wlr_box geo 2022-12-29 23:18:08 +01:00
Johan Malm
9dbac2e06f layer: use scene-graph API more fully
...and thus simplify the usage of wlr_scene_node_at(). Specifically:

- desktop.c: in get_cursor_context() use node-description for
  layer-surfaces and layer-popups. This lays the foundations for a
  pointer-enter-event being sent when a new layer-surfaces appears under
  the pointer (even if the pointer doesn not move).

- layers.c:

  * Iterate over `struct wlr_scene_tree *layer_tree[]` rather than
    `struct wl_list layers[]` when arranging layers to avoid surfaces
    being out of sync with nodes

  * Set signal handlers after scene node creation to avoid configure
    race conditions

  * Handle scene-node destroy event rather than event of
    `struct wlr_layer_surface_v1`

  * Arrange layers on map and unmap

  * Handle client request for layer-change

Fixes issue #667
2022-12-29 23:18:08 +01:00
Consolatis
2ed7a10779 Chase wlroots: every scene_node parent is now a tree
Chases wlroots ccd0f85c2a36308e35b153c7f9653abac7659af3
wlr_scene: Only allow parenting on a wlr_scene_tree
2022-06-07 07:13:37 +01:00
Johan Malm
852a6f02fa layers: fix layer_popup_tree implementation 2022-03-06 16:48:39 +00:00
Johan Malm
d3918eec0a layers: only define LAB_NR_LAYERS locally where needed 2022-03-02 20:39:46 +00:00
Johan Malm
98d5fd483d layers: s/arrange_layers/layers_arrange/
Because we like to start public function names with the name of the
file.

Move prototype from labwc.h to layers.h
2022-03-02 20:29:29 +00:00
Johan Malm
49e8658a7b layer: support popups 2022-02-26 22:36:16 +00:00
Johan Malm
f26b61137d layers.h: define LAB_NR_LAYERS (4) 2022-02-23 21:47:01 +00:00
Johan Malm
688abf7db1 Handle layers under the scene-graph API
This excludes popups.
2022-02-23 21:47:01 +00:00
Johan Malm
b79744e7b0 Chase wlroots master
We need it for wlr_scene_layer_surface_v1_create()
2022-02-23 21:47:01 +00:00
Johan Malm
e227de1346 Add SPDX identifiers 2021-11-13 21:56:53 +00:00
Johan Malm
174e82a608 layers: support popups 2021-10-20 22:32:46 +01:00
Johan Malm
73b8f06a26 layer-shell: fix commit handler (issue #71)
On commit, do not arrange layers unless the layer shell-specific state
changed or the layer was (un)mapped.

Chase swaywm/sway@5fd5d643 and swaywm/wlroots@754f40f9
2021-10-15 19:14:07 +01:00
Johan Malm
a26fd5a75b layers: handle top layer unmap/destroy better
On losing top layer focus, set focus on topmost mapped view.
2020-10-31 15:09:13 +00:00
Johan Malm
a4c22f7c4d Add partial support for layer-shell
We can now run swaybg and waybar
2020-09-30 17:18:20 +01:00