mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Set title on outputs that the focused surface is intersecting with
This commit is contained in:
parent
24f48966d8
commit
bcd0086f13
1 changed files with 10 additions and 1 deletions
11
seat.c
11
seat.c
|
|
@ -853,10 +853,19 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view)
|
|||
}
|
||||
|
||||
view_activate(view, true);
|
||||
|
||||
struct wlr_box surface_box;
|
||||
wlr_surface_get_extends(view->wlr_surface, &surface_box);
|
||||
|
||||
char *title = view_get_title(view);
|
||||
struct cg_output *output;
|
||||
wl_list_for_each(output, &server->outputs, link) {
|
||||
output_set_window_title(output, title);
|
||||
struct wlr_box *output_box =
|
||||
wlr_output_layout_get_box(view->server->output_layout, output->wlr_output);
|
||||
struct wlr_box intersection;
|
||||
if (wlr_box_intersection(&intersection, &surface_box, output_box)) {
|
||||
output_set_window_title(output, title);
|
||||
}
|
||||
}
|
||||
free(title);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue