diff options
author | 2017-12-12 20:02:01 +0100 | |
---|---|---|
committer | 2017-12-12 20:02:01 +0100 | |
commit | c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4 (patch) | |
tree | 8118cd69c22ec2545572a8e443080907f087d401 /sway/desktop/output.c | |
parent | Add scale and transform events to sway_output (diff) | |
download | sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.gz sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.zst sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.zip |
Listen to output layout change
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f44cda1a..bcdaa7d2 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -72,8 +72,7 @@ static void output_frame_view(swayc_t *view, void *data) { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | static void output_frame_notify(struct wl_listener *listener, void *data) { | 74 | static void output_frame_notify(struct wl_listener *listener, void *data) { |
75 | struct sway_output *soutput = wl_container_of( | 75 | struct sway_output *soutput = wl_container_of(listener, soutput, frame); |
76 | listener, soutput, frame); | ||
77 | struct wlr_output *wlr_output = data; | 76 | struct wlr_output *wlr_output = data; |
78 | struct sway_server *server = soutput->server; | 77 | struct sway_server *server = soutput->server; |
79 | 78 | ||
@@ -93,20 +92,17 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
93 | } | 92 | } |
94 | 93 | ||
95 | static void output_resolution_notify(struct wl_listener *listener, void *data) { | 94 | static void output_resolution_notify(struct wl_listener *listener, void *data) { |
96 | struct sway_output *soutput = wl_container_of( | 95 | struct sway_output *soutput = wl_container_of(listener, soutput, resolution); |
97 | listener, soutput, resolution); | ||
98 | arrange_windows(soutput->swayc, -1, -1); | 96 | arrange_windows(soutput->swayc, -1, -1); |
99 | } | 97 | } |
100 | 98 | ||
101 | static void output_scale_notify(struct wl_listener *listener, void *data) { | 99 | static void output_scale_notify(struct wl_listener *listener, void *data) { |
102 | struct sway_output *soutput = wl_container_of( | 100 | struct sway_output *soutput = wl_container_of(listener, soutput, scale); |
103 | listener, soutput, scale); | ||
104 | arrange_windows(soutput->swayc, -1, -1); | 101 | arrange_windows(soutput->swayc, -1, -1); |
105 | } | 102 | } |
106 | 103 | ||
107 | static void output_transform_notify(struct wl_listener *listener, void *data) { | 104 | static void output_transform_notify(struct wl_listener *listener, void *data) { |
108 | struct sway_output *soutput = wl_container_of( | 105 | struct sway_output *soutput = wl_container_of(listener, soutput, transform); |
109 | listener, soutput, transform); | ||
110 | arrange_windows(soutput->swayc, -1, -1); | 106 | arrange_windows(soutput->swayc, -1, -1); |
111 | } | 107 | } |
112 | 108 | ||