mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
foreign-toplevel-management: report parent toplevel
Based on the wlr-protocols PR: https://github.com/swaywm/wlr-protocols/pull/52
This commit is contained in:
parent
1ac5257357
commit
36395e5b1c
4 changed files with 123 additions and 8 deletions
|
|
@ -50,6 +50,7 @@ struct wlr_foreign_toplevel_handle_v1 {
|
|||
|
||||
char *title;
|
||||
char *app_id;
|
||||
struct wlr_foreign_toplevel_handle_v1 *parent;
|
||||
struct wl_list outputs; // wlr_foreign_toplevel_v1_output
|
||||
uint32_t state; // wlr_foreign_toplevel_v1_state
|
||||
|
||||
|
|
@ -104,6 +105,12 @@ struct wlr_foreign_toplevel_manager_v1 *wlr_foreign_toplevel_manager_v1_create(
|
|||
|
||||
struct wlr_foreign_toplevel_handle_v1 *wlr_foreign_toplevel_handle_v1_create(
|
||||
struct wlr_foreign_toplevel_manager_v1 *manager);
|
||||
/* Destroy the given toplevel handle, sending the closed event to any
|
||||
* client. Also, if the destroyed toplevel is set as a parent of any
|
||||
* other valid toplevel, clients still holding a handle to both are
|
||||
* sent a parent signal with NULL parent. If this is not desired, the
|
||||
* caller should ensure that any child toplevels are destroyed before
|
||||
* the parent. */
|
||||
void wlr_foreign_toplevel_handle_v1_destroy(
|
||||
struct wlr_foreign_toplevel_handle_v1 *toplevel);
|
||||
|
||||
|
|
@ -126,4 +133,14 @@ void wlr_foreign_toplevel_handle_v1_set_activated(
|
|||
void wlr_foreign_toplevel_handle_v1_set_fullscreen(
|
||||
struct wlr_foreign_toplevel_handle_v1* toplevel, bool fullscreen);
|
||||
|
||||
/* Set the parent of a toplevel. If the parent changed from its previous
|
||||
* value, also sends a parent event to all clients that hold handles to
|
||||
* both toplevel and parent (no message is sent to clients that have
|
||||
* previously destroyed their parent handle). NULL is allowed as the
|
||||
* parent, meaning no parent exists. */
|
||||
void wlr_foreign_toplevel_handle_v1_set_parent(
|
||||
struct wlr_foreign_toplevel_handle_v1 *toplevel,
|
||||
struct wlr_foreign_toplevel_handle_v1 *parent);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue