Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'vanilla/stable' into gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Airblader committed Feb 1, 2021
2 parents dd1d37b + 77d5bbb commit 7994e49
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion etc/config
Expand Up @@ -54,7 +54,7 @@ bindsym Mod1+Shift+q kill
# start dmenu (a program launcher)
bindsym Mod1+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindsym Mod1+d exec rofi -modi drun,run -show drun
# bindsym Mod1+d exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
Expand Down
4 changes: 2 additions & 2 deletions etc/config.keycodes
Expand Up @@ -48,10 +48,10 @@ bindcode $mod+Shift+24 kill
# start dmenu (a program launcher)
bindcode $mod+40 exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec rofi -modi drun,run -show drun
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop

# change focus
bindcode $mod+44 focus left
Expand Down
37 changes: 20 additions & 17 deletions src/randr.c
Expand Up @@ -439,28 +439,31 @@ void init_ws_for_output(Output *output) {
Con *previous_focus = con_get_workspace(focused);

/* Iterate over all workspaces and check if any of them should be assigned
* to this output. */
Con *output_con;
TAILQ_FOREACH (output_con, &(croot->nodes_head), nodes) {
if (con_is_internal(output_con)) {
* to this output.
* Note: in order to do that we iterate over all_cons and not using another
* list that would be updated during iteration by the
* workspace_move_to_output function. */
Con *workspace;
TAILQ_FOREACH (workspace, &all_cons, all_cons) {
if (workspace->type != CT_WORKSPACE || con_is_internal(workspace)) {
continue;
}

Con *workspace;
TAILQ_FOREACH (workspace, &(output_get_content(output_con)->nodes_head), nodes) {
Con *workspace_out = get_assigned_output(workspace->name, workspace->num);
if (output->con != workspace_out) {
continue;
}
Con *workspace_out = get_assigned_output(workspace->name, workspace->num);

DLOG("Moving workspace \"%s\" from output \"%s\" to \"%s\" due to assignment\n",
workspace->name, workspace_out->name, output_primary_name(output));
/* Need to copy output's rect since content is not yet rendered. We
* can't call render_con here because render_output only proceeds
* if a workspace exists. */
content->rect = output->con->rect;
workspace_move_to_output(workspace, output);
if (output->con != workspace_out) {
continue;
}

DLOG("Moving workspace \"%s\" from output \"%s\" to \"%s\" due to assignment\n",
workspace->name, output_primary_name(get_output_for_con(workspace)),
output_primary_name(output));

/* Need to copy output's rect since content is not yet rendered. We
* can't call render_con here because render_output only proceeds
* if a workspace exists. */
content->rect = output->con->rect;
workspace_move_to_output(workspace, output);
}

/* Temporarily set the focused container, might not be initialized yet. */
Expand Down

0 comments on commit 7994e49

Please sign in to comment.