This commit is contained in:
Alexander Orzechowski 2026-01-28 09:56:39 +07:00 committed by GitHub
commit 74606dee4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 158 additions and 151 deletions

View file

@ -84,9 +84,16 @@ struct sway_cursor {
struct sway_node;
struct wlr_scene_node *scene_node_at_coords(
double lx, double ly, double *sx, double *sy);
struct wlr_surface *surface_try_from_scene_node(struct wlr_scene_node *node);
struct sway_node *sway_node_try_from_scene_node(struct wlr_scene_node *node,
double lx, double ly);
struct sway_node *node_at_coords(
struct sway_seat *seat, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
double lx, double ly, struct wlr_surface **surface, double *sx, double *sy);
void sway_cursor_destroy(struct sway_cursor *cursor);
struct sway_cursor *sway_cursor_create(struct sway_seat *seat);

View file

@ -37,9 +37,6 @@ struct sway_layer_popup {
struct sway_output;
struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
struct wlr_surface *surface);
void arrange_layers(struct sway_output *output);
void destroy_layers(struct sway_output *output);

View file

@ -10,6 +10,14 @@
#define _SWAY_SCENE_DESCRIPTOR_H
#include <wlr/types/wlr_scene.h>
struct sway_view;
// used for SWAY_SCENE_DESC_POPUP
struct sway_popup_desc {
struct wlr_scene_node *relative;
struct sway_view *view;
};
enum sway_scene_descriptor_type {
SWAY_SCENE_DESC_BUFFER_TIMER,
SWAY_SCENE_DESC_NON_INTERACTIVE,
@ -24,10 +32,23 @@ enum sway_scene_descriptor_type {
bool scene_descriptor_assign(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type, void *data);
bool scene_descriptor_reassign(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type, void *data);
void *scene_descriptor_try_get(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type);
void scene_descriptor_destroy(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type);
/*
* Searches the scene node and all its parents for this scene descriptor.
*
* Note that while searching, SWAY_SCENE_DESC_POPUP types will start tracking
* its relative node. With popups, they are part of a seperate layer in the scene
* graph, but that's irrelavent to users of this function.
*/
void *scene_descriptor_find(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type);
#endif

View file

@ -11,6 +11,7 @@
#endif
#include "sway/input/input-manager.h"
#include "sway/input/seat.h"
#include "sway/scene_descriptor.h"
struct sway_container;
struct sway_xdg_decoration;
@ -194,11 +195,6 @@ struct sway_xwayland_unmanaged {
};
#endif
struct sway_popup_desc {
struct wlr_scene_node *relative;
struct sway_view *view;
};
struct sway_xdg_popup {
struct sway_view *view;
struct wlr_xdg_popup *wlr_xdg_popup;