mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
cursor: Restore drag icon after the move to scene-graph
Also move everything DnD related to src/dnd.c
This commit is contained in:
parent
3e1a800c14
commit
deb658b672
6 changed files with 241 additions and 55 deletions
27
include/dnd.h
Normal file
27
include/dnd.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LAB_DND_H
|
||||
#define __LAB_DND_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
struct seat;
|
||||
struct wlr_drag_icon;
|
||||
struct wlr_scene_tree;
|
||||
|
||||
struct drag_icon {
|
||||
struct wlr_scene_tree *icon_tree;
|
||||
struct wlr_drag_icon *icon;
|
||||
struct {
|
||||
struct wl_listener map;
|
||||
struct wl_listener commit;
|
||||
struct wl_listener unmap;
|
||||
struct wl_listener destroy;
|
||||
} events;
|
||||
};
|
||||
|
||||
void dnd_init(struct seat *seat);
|
||||
void dnd_icons_show(struct seat *seat, bool show);
|
||||
void dnd_icons_move(struct seat *seat, double x, double y);
|
||||
void dnd_finish(struct seat *seat);
|
||||
|
||||
#endif /* __LAB_DND_H */
|
||||
|
|
@ -104,7 +104,6 @@ struct seat {
|
|||
struct wlr_cursor *cursor;
|
||||
struct wlr_xcursor_manager *xcursor_manager;
|
||||
|
||||
struct wlr_drag_icon *drag_icon;
|
||||
struct wlr_pointer_constraint_v1 *current_constraint;
|
||||
struct wlr_idle *wlr_idle;
|
||||
struct wlr_idle_inhibit_manager_v1 *wlr_idle_inhibit_manager;
|
||||
|
|
@ -136,6 +135,16 @@ struct seat {
|
|||
uint32_t resize_edges;
|
||||
} pressed;
|
||||
|
||||
struct {
|
||||
bool active;
|
||||
struct {
|
||||
struct wl_listener request;
|
||||
struct wl_listener start;
|
||||
struct wl_listener destroy;
|
||||
} events;
|
||||
struct wlr_scene_tree *icons;
|
||||
} drag;
|
||||
|
||||
struct wl_client *active_client_while_inhibited;
|
||||
struct wl_list inputs;
|
||||
struct wl_listener new_input;
|
||||
|
|
@ -163,9 +172,6 @@ struct seat {
|
|||
struct wl_listener touch_motion;
|
||||
struct wl_listener touch_frame;
|
||||
|
||||
struct wl_listener request_start_drag;
|
||||
struct wl_listener start_drag;
|
||||
struct wl_listener destroy_drag;
|
||||
struct wl_listener constraint_commit;
|
||||
struct wl_listener idle_inhibitor_create;
|
||||
struct wl_listener pressed_surface_destroy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue