mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
ToggleKeybinds per window
This commit is contained in:
parent
b6dfffc782
commit
235a8ad9bc
12 changed files with 84 additions and 5 deletions
|
|
@ -163,6 +163,7 @@ ssd_create(struct view *view, bool active)
|
|||
ssd_titlebar_create(ssd);
|
||||
ssd->margin = ssd_thickness(view);
|
||||
ssd_set_active(ssd, active);
|
||||
ssd_enable_keybind_inhibit_indicator(ssd, view->inhibits_keybinds);
|
||||
ssd->state.geometry = view->current;
|
||||
|
||||
return ssd;
|
||||
|
|
@ -272,6 +273,22 @@ ssd_set_active(struct ssd *ssd, bool active)
|
|||
wlr_scene_node_set_enabled(&ssd->titlebar.inactive.tree->node, !active);
|
||||
}
|
||||
|
||||
void
|
||||
ssd_enable_keybind_inhibit_indicator(struct ssd *ssd, bool enable)
|
||||
{
|
||||
if (!ssd) {
|
||||
return;
|
||||
}
|
||||
|
||||
float *color = enable
|
||||
? rc.theme->window_toggled_keybinds_color
|
||||
: rc.theme->window_active_border_color;
|
||||
|
||||
struct ssd_part *part = ssd_get_part(&ssd->border.active.parts, LAB_SSD_PART_TOP);
|
||||
struct wlr_scene_rect *rect = lab_wlr_scene_get_rect(part->node);
|
||||
wlr_scene_rect_set_color(rect, color);
|
||||
}
|
||||
|
||||
struct ssd_hover_state *
|
||||
ssd_hover_state_new(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue