MwLLWaylandSetToolWindowType
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
a6202258b7
commit
a61c199d5e
2 changed files with 18 additions and 1 deletions
|
|
@ -464,6 +464,8 @@ struct _MwLLWayland {
|
||||||
MwBool accepts_dnd;
|
MwBool accepts_dnd;
|
||||||
|
|
||||||
MwBool shown;
|
MwBool shown;
|
||||||
|
|
||||||
|
enum zwlr_layer_shell_v1_layer layer_surface_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _MwLLWaylandColor {
|
struct _MwLLWaylandColor {
|
||||||
|
|
@ -526,4 +528,13 @@ typedef struct zxdg_decoration_manager_v1_context {
|
||||||
|
|
||||||
extern struct zwp_relative_pointer_v1_listener MwLLWaylandRelativePointerListener;
|
extern struct zwp_relative_pointer_v1_listener MwLLWaylandRelativePointerListener;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* function for setting the layer surface type used when creating a tool window
|
||||||
|
* (assuming layer surfaces are used).
|
||||||
|
*
|
||||||
|
* NOTE: Must be called after MwLLMakeToolWindow, as that function sets the type to
|
||||||
|
* the default of ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY.
|
||||||
|
*/
|
||||||
|
MWDECL void MWAPI MwLLWaylandSetToolWindowType(MwLL handle, enum zwlr_layer_shell_v1_layer type);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -725,7 +725,7 @@ static void setup_layer_surface(MwLL r, int x, int y, int width, int height) {
|
||||||
|
|
||||||
r->wayland.framebuffer.surface = wl_compositor_create_surface(r->wayland.compositor);
|
r->wayland.framebuffer.surface = wl_compositor_create_surface(r->wayland.compositor);
|
||||||
|
|
||||||
r->wayland.layer_surface->surface = zwlr_layer_shell_v1_get_layer_surface(layer_shell, r->wayland.framebuffer.surface, NULL, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "milsko-surfaces");
|
r->wayland.layer_surface->surface = zwlr_layer_shell_v1_get_layer_surface(layer_shell, r->wayland.framebuffer.surface, NULL, r->wayland.layer_surface_type, "milsko-surfaces");
|
||||||
|
|
||||||
zwlr_layer_surface_v1_set_size(r->wayland.layer_surface->surface, width, height);
|
zwlr_layer_surface_v1_set_size(r->wayland.layer_surface->surface, width, height);
|
||||||
zwlr_layer_surface_v1_set_margin(r->wayland.layer_surface->surface,
|
zwlr_layer_surface_v1_set_margin(r->wayland.layer_surface->surface,
|
||||||
|
|
@ -1873,9 +1873,15 @@ static void MwLLMakeToolWindowImpl(MwLL handle) {
|
||||||
handle->wayland.type_to_be = MwLL_WAYLAND_POPUP;
|
handle->wayland.type_to_be = MwLL_WAYLAND_POPUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handle->wayland.layer_surface_type = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
|
||||||
|
|
||||||
handle->wayland.changing = MwTRUE;
|
handle->wayland.changing = MwTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MWDECL void MWAPI MwLLWaylandSetToolWindowType(MwLL handle, enum zwlr_layer_shell_v1_layer type) {
|
||||||
|
handle->wayland.layer_surface_type = type;
|
||||||
|
}
|
||||||
|
|
||||||
static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) {
|
static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) {
|
||||||
MwLL topmost_parent = handle;
|
MwLL topmost_parent = handle;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue