mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Add logging and new windows into layout tree
This commit is contained in:
parent
2786fa2215
commit
0427fddb5a
7 changed files with 150 additions and 10 deletions
|
|
@ -17,18 +17,17 @@ void handle_output_resolution_change(wlc_handle output, const struct wlc_size *f
|
|||
}
|
||||
|
||||
bool handle_view_created(wlc_handle view) {
|
||||
printf("View created, focusing");
|
||||
wlc_view_focus(view);
|
||||
wlc_view_bring_to_front(view);
|
||||
add_view(view);
|
||||
return true;
|
||||
}
|
||||
|
||||
void handle_view_destroyed(wlc_handle view) {
|
||||
printf("View destroyed");
|
||||
wlc_view_focus(get_topmost(wlc_view_get_output(view), 0));
|
||||
destroy_view(view);
|
||||
return true;
|
||||
}
|
||||
|
||||
void handle_view_focus(wlc_handle view, bool focus) {
|
||||
printf("View focused\n");
|
||||
wlc_view_set_state(view, WLC_BIT_ACTIVATED, focus);
|
||||
focused_view = view;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue