mirror of
https://github.com/labwc/labwc.git
synced 2026-03-16 05:33:50 -04:00
osd: allow clicking an osd item to focus the window
This commit is contained in:
parent
00f0a46ef7
commit
9197eb468a
9 changed files with 55 additions and 1 deletions
|
|
@ -128,6 +128,7 @@ create_item_scene(struct wlr_scene_tree *parent, struct view *view,
|
|||
struct osd_thumbnail_item *item = znew(*item);
|
||||
wl_list_append(&output->osd_scene.items, &item->base.link);
|
||||
struct wlr_scene_tree *tree = wlr_scene_tree_create(parent);
|
||||
node_descriptor_create(&tree->node, LAB_NODE_OSD_ITEM, NULL, item);
|
||||
item->base.tree = tree;
|
||||
item->base.view = view;
|
||||
|
||||
|
|
@ -142,6 +143,10 @@ create_item_scene(struct wlr_scene_tree *parent, struct view *view,
|
|||
};
|
||||
item->active_bg = lab_scene_rect_create(tree, &opts);
|
||||
|
||||
/* hitbox for mouse clicks */
|
||||
wlr_scene_rect_create(tree, switcher_theme->item_width,
|
||||
switcher_theme->item_height, (float[4]) {0});
|
||||
|
||||
/* thumbnail */
|
||||
struct wlr_buffer *thumb_buffer = render_thumb(output, view);
|
||||
if (thumb_buffer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue