wayland/client: Add make_desktop() method
Allows to mark a wayland client window as a DOCK window. The reason for this is that in Gala (elementary OS's window manager) we would like to continue using GTK apps as panel and dock on wayland. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3612>
This commit is contained in:
parent
7bf8945da4
commit
d603cc351f
@ -64,5 +64,9 @@ META_EXPORT
|
|||||||
void meta_wayland_client_make_desktop (MetaWaylandClient *client,
|
void meta_wayland_client_make_desktop (MetaWaylandClient *client,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
void meta_wayland_client_make_dock (MetaWaylandClient *client,
|
||||||
|
MetaWindow *window);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -494,6 +494,27 @@ meta_wayland_client_make_desktop (MetaWaylandClient *client,
|
|||||||
meta_window_set_type (window, META_WINDOW_DESKTOP);
|
meta_window_set_type (window, META_WINDOW_DESKTOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_wayland_client_make_dock:
|
||||||
|
* @client: a #MetaWaylandClient
|
||||||
|
* @window: a MetaWindow
|
||||||
|
*
|
||||||
|
* Mark window as DOCK window
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
meta_wayland_client_make_dock (MetaWaylandClient *client,
|
||||||
|
MetaWindow *window)
|
||||||
|
{
|
||||||
|
g_return_if_fail (META_IS_WAYLAND_CLIENT (client));
|
||||||
|
g_return_if_fail (META_IS_WINDOW (window));
|
||||||
|
g_return_if_fail (window->type == META_WINDOW_NORMAL);
|
||||||
|
|
||||||
|
if (!meta_wayland_client_owns_window (client, window))
|
||||||
|
return;
|
||||||
|
|
||||||
|
meta_window_set_type (window, META_WINDOW_DOCK);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_wayland_client_matches (MetaWaylandClient *client,
|
meta_wayland_client_matches (MetaWaylandClient *client,
|
||||||
const struct wl_client *wayland_client)
|
const struct wl_client *wayland_client)
|
||||||
|
Loading…
Reference in New Issue
Block a user