mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
src/layers.c: Adjust views based on usable_area changes
This commit is contained in:
parent
09915b8f43
commit
f4aa6118e9
4 changed files with 15 additions and 5 deletions
|
|
@ -460,6 +460,7 @@ void foreign_toplevel_handle_create(struct view *view);
|
|||
void desktop_move_to_front(struct view *view);
|
||||
void desktop_move_to_back(struct view *view);
|
||||
void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
|
||||
void desktop_arrange_all_views(struct server *server);
|
||||
|
||||
enum lab_cycle_dir {
|
||||
LAB_CYCLE_DIR_NONE,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,16 @@ deactivate_all_views(struct server *server)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
desktop_arrange_all_views(struct server *server)
|
||||
{
|
||||
/* Adjust window positions/sizes */
|
||||
struct view *view;
|
||||
wl_list_for_each(view, &server->views, link) {
|
||||
view_adjust_for_layout_change(view);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,7 +98,9 @@ layers_arrange(struct output *output)
|
|||
!seat->focused_layer->current.keyboard_interactive) {
|
||||
seat_set_focus_layer(seat, NULL);
|
||||
}
|
||||
/* FIXME: should we call a desktop_arrange_all_views() here? */
|
||||
|
||||
/* Finally re-arrange all views based on usable_area */
|
||||
desktop_arrange_all_views(server);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -209,10 +209,7 @@ static void
|
|||
output_update_for_layout_change(struct server *server)
|
||||
{
|
||||
/* Adjust window positions/sizes */
|
||||
struct view *view;
|
||||
wl_list_for_each(view, &server->views, link) {
|
||||
view_adjust_for_layout_change(view);
|
||||
}
|
||||
desktop_arrange_all_views(server);
|
||||
|
||||
/*
|
||||
* "Move" each wlr_output_cursor (in per-output coordinates) to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue