Skip to content
Snippets Groups Projects
Commit a862f9c6 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

PhoshLayerSurface: Add accessors to get the {layer,wl}_surfaces

parent d126cb89
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,6 @@ static void layer_surface_closed (void *data,
PhoshLayerSurfacePrivate *priv = phosh_layer_surface_get_instance_private (self);
g_return_if_fail (priv->layer_surface != surface);
zwlr_layer_surface_v1_destroy(priv->layer_surface);
priv->layer_surface = NULL;
gtk_widget_destroy (GTK_WIDGET (self));
......@@ -344,3 +343,24 @@ phosh_layer_surface_new (gpointer layer_shell,
"layer-shell", layer_shell,
"wl-output", wl_output);
}
struct zwlr_layer_surface_v1 *
phosh_layer_surface_get_layer_surface(PhoshLayerSurface *self)
{
PhoshLayerSurfacePrivate *priv;
g_return_val_if_fail (PHOSH_IS_LAYER_SURFACE (self), NULL);
priv = phosh_layer_surface_get_instance_private (self);
return priv->layer_surface;
}
struct wl_surface *
phosh_layer_surface_get_wl_surface(PhoshLayerSurface *self)
{
PhoshLayerSurfacePrivate *priv;
g_return_val_if_fail (PHOSH_IS_LAYER_SURFACE (self), NULL);
priv = phosh_layer_surface_get_instance_private (self);
return priv->wl_surface;
}
......@@ -27,5 +27,7 @@ struct _PhoshLayerSurfaceClass
void (*configured) (PhoshLayerSurface *self);
};
GtkWidget * phosh_layer_surface_new (gpointer layer_shell,
gpointer wl_output);
GtkWidget *phosh_layer_surface_new (gpointer layer_shell,
gpointer wl_output);
struct zwlr_layer_surface_v1 *phosh_layer_surface_get_layer_surface(PhoshLayerSurface *self);
struct wl_surface *phosh_layer_surface_get_wl_surface(PhoshLayerSurface *self);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment