mirror of
https://github.com/labwc/labwc.git
synced 2026-03-31 07:11:19 -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_front(struct view *view);
|
||||||
void desktop_move_to_back(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_focus_and_activate_view(struct seat *seat, struct view *view);
|
||||||
|
void desktop_arrange_all_views(struct server *server);
|
||||||
|
|
||||||
enum lab_cycle_dir {
|
enum lab_cycle_dir {
|
||||||
LAB_CYCLE_DIR_NONE,
|
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
|
void
|
||||||
desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
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->focused_layer->current.keyboard_interactive) {
|
||||||
seat_set_focus_layer(seat, NULL);
|
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
|
static void
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,7 @@ static void
|
||||||
output_update_for_layout_change(struct server *server)
|
output_update_for_layout_change(struct server *server)
|
||||||
{
|
{
|
||||||
/* Adjust window positions/sizes */
|
/* Adjust window positions/sizes */
|
||||||
struct view *view;
|
desktop_arrange_all_views(server);
|
||||||
wl_list_for_each(view, &server->views, link) {
|
|
||||||
view_adjust_for_layout_change(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "Move" each wlr_output_cursor (in per-output coordinates) to
|
* "Move" each wlr_output_cursor (in per-output coordinates) to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue