]> git.mdlowis.com Git - proto/labwc.git/commit
layer: use scene-graph API more fully
authorJohan Malm <jgm323@gmail.com>
Thu, 22 Dec 2022 21:58:55 +0000 (21:58 +0000)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 29 Dec 2022 22:18:08 +0000 (23:18 +0100)
commit9dbac2e06fc0ae3e39d1fa768f35b8368d8e324a
tree0b23b0ff3a38e6a813c402f8d98ea12ceb345bd8
parente39fd341ec1eba2cd6d65e89587aec9dbc9f346b
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
include/layers.h
src/desktop.c
src/layers.c