mirror of
https://github.com/labwc/labwc.git
synced 2026-02-15 22:05:25 -05:00
workspaces: keep unfocusable omnipresent views visible
When switching between workspaces, we need to migrate omnipresent views to the new workspace so that they are kept visible. However, by using for_each_view_reverse() macro, we were not migrating omnipresent views that view_is_focusable() return false (e.g. Conky). Use wl_list_for_each_reverse() macro instead to catch all the omnipresent views.
This commit is contained in:
parent
a2eae22fc2
commit
654da8c8a9
1 changed files with 6 additions and 4 deletions
|
|
@ -469,11 +469,13 @@ workspaces_switch_to(struct workspace *target, bool update_focus)
|
|||
lab_ext_workspace_set_active(
|
||||
server->workspaces.current->ext_workspace, false);
|
||||
|
||||
/* Move Omnipresent views to new workspace */
|
||||
/*
|
||||
* Move Omnipresent views to new workspace.
|
||||
* Not using for_each_view() since it skips views that
|
||||
* view_is_focusable() returns false (e.g. Conky).
|
||||
*/
|
||||
struct view *view;
|
||||
enum lab_view_criteria criteria =
|
||||
LAB_VIEW_CRITERIA_CURRENT_WORKSPACE;
|
||||
for_each_view_reverse(view, &server->views, criteria) {
|
||||
wl_list_for_each_reverse(view, &server->views, link) {
|
||||
if (view->visible_on_all_workspaces) {
|
||||
view_move_to_workspace(view, target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue