diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
commit | 733993a651c71f7e2198d505960d6bbd31e0e107 (patch) | |
tree | e51732c5872b624e73355f9e5b3f762101f3cd0d /sway/desktop/output.c | |
parent | Initial (awful) pass on xdg shell support (diff) | |
download | sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip |
Move everything to sway/old/
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6d0bebc5..6ddcac3b 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -4,11 +4,9 @@ | |||
4 | #include <wayland-server.h> | 4 | #include <wayland-server.h> |
5 | #include <wlr/types/wlr_output.h> | 5 | #include <wlr/types/wlr_output.h> |
6 | #include <wlr/render.h> | 6 | #include <wlr/render.h> |
7 | #include "sway/server.h" | ||
8 | #include "sway/container.h" | ||
9 | #include "sway/workspace.h" | ||
10 | #include "sway/output.h" | ||
11 | #include "log.h" | 7 | #include "log.h" |
8 | #include "sway/output.h" | ||
9 | #include "sway/server.h" | ||
12 | 10 | ||
13 | static void output_frame_notify(struct wl_listener *listener, void *data) { | 11 | static void output_frame_notify(struct wl_listener *listener, void *data) { |
14 | struct sway_output *soutput = wl_container_of( | 12 | struct sway_output *soutput = wl_container_of( |
@@ -37,19 +35,10 @@ void output_add_notify(struct wl_listener *listener, void *data) { | |||
37 | output->wlr_output = wlr_output; | 35 | output->wlr_output = wlr_output; |
38 | output->server = server; | 36 | output->server = server; |
39 | 37 | ||
40 | swayc_t *node = new_output(output); | ||
41 | if (!sway_assert(node, "Failed to allocate output")) { | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | // Switch to workspace if we need to | ||
46 | if (swayc_active_workspace() == NULL) { | ||
47 | swayc_t *ws = node->children->items[0]; | ||
48 | workspace_switch(ws); | ||
49 | } | ||
50 | |||
51 | output->frame.notify = output_frame_notify; | 38 | output->frame.notify = output_frame_notify; |
52 | wl_signal_add(&wlr_output->events.frame, &output->frame); | 39 | wl_signal_add(&wlr_output->events.frame, &output->frame); |
40 | |||
41 | // TODO: Add to tree | ||
53 | } | 42 | } |
54 | 43 | ||
55 | void output_remove_notify(struct wl_listener *listener, void *data) { | 44 | void output_remove_notify(struct wl_listener *listener, void *data) { |