mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
rootston: damage tracking for drag icons
This commit is contained in:
parent
415a2b7c56
commit
2ad7df8680
9 changed files with 142 additions and 31 deletions
|
|
@ -37,9 +37,14 @@ struct roots_output {
|
|||
void output_add_notify(struct wl_listener *listener, void *data);
|
||||
void output_remove_notify(struct wl_listener *listener, void *data);
|
||||
|
||||
struct roots_view;
|
||||
struct roots_drag_icon;
|
||||
|
||||
void output_damage_whole_view(struct roots_output *output,
|
||||
struct roots_view *view);
|
||||
void output_damage_from_view(struct roots_output *output,
|
||||
struct roots_view *view);
|
||||
void output_damage_whole_drag_icon(struct roots_output *output,
|
||||
struct roots_drag_icon *icon);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,12 +17,15 @@ struct roots_seat {
|
|||
struct wl_list views; // roots_seat_view::link
|
||||
bool has_focus;
|
||||
|
||||
struct wl_list drag_icons; // roots_drag_icon::link
|
||||
|
||||
struct wl_list keyboards;
|
||||
struct wl_list pointers;
|
||||
struct wl_list touch;
|
||||
struct wl_list tablet_tools;
|
||||
|
||||
struct wl_listener seat_destroy;
|
||||
struct wl_listener new_drag_icon;
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct roots_seat_view {
|
||||
|
|
@ -33,6 +36,18 @@ struct roots_seat_view {
|
|||
struct wl_listener view_destroy;
|
||||
};
|
||||
|
||||
struct roots_drag_icon {
|
||||
struct roots_seat *seat;
|
||||
struct wlr_drag_icon *wlr_drag_icon;
|
||||
struct wl_list link;
|
||||
|
||||
double x, y;
|
||||
|
||||
struct wl_listener surface_commit;
|
||||
struct wl_listener map;
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct roots_pointer {
|
||||
struct roots_seat *seat;
|
||||
struct wlr_input_device *device;
|
||||
|
|
@ -84,4 +99,8 @@ void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view,
|
|||
|
||||
void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view);
|
||||
|
||||
void roots_drag_icon_update_position(struct roots_drag_icon *icon);
|
||||
|
||||
void roots_drag_icon_damage_whole(struct roots_drag_icon *icon);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ struct wlr_drag_icon {
|
|||
bool is_pointer;
|
||||
int32_t touch_id;
|
||||
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
int32_t sx, sy;
|
||||
|
||||
struct {
|
||||
struct wl_signal map; // emitted when mapped or unmapped
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ struct wlr_seat {
|
|||
struct wl_signal selection;
|
||||
struct wl_signal primary_selection;
|
||||
|
||||
struct wl_signal new_drag_icon;
|
||||
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue