aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-02 12:23:15 -0400
committerGitHub <noreply@github.com>2018-04-02 12:23:15 -0400
commit7e3aa1daa8b945b762d98bc67c660cdc6c94b72f (patch)
treed2b9dd4816efdf861e71bcd1eff6a70928e59dc6 /sway/desktop
parent122b96abed9955f78e3f157167d34312f5bb551d (diff)
parente3689dd5a93b4f4ae62637a2b81797335aafdcaf (diff)
downloadsway-7e3aa1daa8b945b762d98bc67c660cdc6c94b72f.tar.xz
Merge pull request #1693 from swaywm/move-cmd
Partially implement move command
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 0d706c52..c4265818 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -229,9 +229,12 @@ static void render_output(struct sway_output *output, struct timespec *when,
struct sway_seat *seat = input_manager_current_seat(input_manager);
struct sway_container *focus =
sway_seat_get_focus_inactive(seat, output->swayc);
- struct sway_container *workspace = (focus->type == C_WORKSPACE ?
- focus :
- container_parent(focus, C_WORKSPACE));
+ if (!focus) {
+ // We've never been to this output before
+ focus = output->swayc->children->items[0];
+ }
+ struct sway_container *workspace = focus->type == C_WORKSPACE ?
+ focus : container_parent(focus, C_WORKSPACE);
struct render_data rdata = {
.output = output,