diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 096df53c..1a8138f8 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -126,7 +126,7 @@ static void handle_output_destroyed(wlc_handle output) { | |||
126 | 126 | ||
127 | static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) { | 127 | static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) { |
128 | sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h); | 128 | sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h); |
129 | swayc_t *c = swayc_by_handle(output); | 129 | swayc_t *c = swayc_by_test(test_handle, &output); |
130 | if (!c) return; | 130 | if (!c) return; |
131 | c->width = to->w; | 131 | c->width = to->w; |
132 | c->height = to->h; | 132 | c->height = to->h; |
@@ -134,7 +134,7 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_ | |||
134 | } | 134 | } |
135 | 135 | ||
136 | static void handle_output_focused(wlc_handle output, bool focus) { | 136 | static void handle_output_focused(wlc_handle output, bool focus) { |
137 | swayc_t *c = swayc_by_handle(output); | 137 | swayc_t *c = swayc_by_test(test_handle, &output); |
138 | // if for some reason this output doesnt exist, create it. | 138 | // if for some reason this output doesnt exist, create it. |
139 | if (!c) { | 139 | if (!c) { |
140 | handle_output_created(output); | 140 | handle_output_created(output); |
@@ -152,7 +152,7 @@ static bool handle_view_created(wlc_handle handle) { | |||
152 | 152 | ||
153 | // Get parent container, to add view in | 153 | // Get parent container, to add view in |
154 | if (parent) { | 154 | if (parent) { |
155 | focused = swayc_by_handle(parent); | 155 | focused = swayc_by_test(test_handle, &parent); |
156 | } | 156 | } |
157 | if (!focused || focused->type == C_OUTPUT) { | 157 | if (!focused || focused->type == C_OUTPUT) { |
158 | focused = get_focused_container(&root_container); | 158 | focused = get_focused_container(&root_container); |
@@ -221,7 +221,7 @@ static bool handle_view_created(wlc_handle handle) { | |||
221 | 221 | ||
222 | static void handle_view_destroyed(wlc_handle handle) { | 222 | static void handle_view_destroyed(wlc_handle handle) { |
223 | sway_log(L_DEBUG, "Destroying window %lu", handle); | 223 | sway_log(L_DEBUG, "Destroying window %lu", handle); |
224 | swayc_t *view = swayc_by_handle(handle); | 224 | swayc_t *view = swayc_by_test(test_handle, &handle); |
225 | 225 | ||
226 | // destroy views by type | 226 | // destroy views by type |
227 | switch (wlc_view_get_type(handle)) { | 227 | switch (wlc_view_get_type(handle)) { |
@@ -258,7 +258,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo | |||
258 | // If the view is floating, then apply the geometry. | 258 | // If the view is floating, then apply the geometry. |
259 | // Otherwise save the desired width/height for the view. | 259 | // Otherwise save the desired width/height for the view. |
260 | // This will not do anything for the time being as WLC improperly sends geometry requests | 260 | // This will not do anything for the time being as WLC improperly sends geometry requests |
261 | swayc_t *view = swayc_by_handle(handle); | 261 | swayc_t *view = swayc_by_test(test_handle, &handle); |
262 | if (view) { | 262 | if (view) { |
263 | view->desired_width = geometry->size.w; | 263 | view->desired_width = geometry->size.w; |
264 | view->desired_height = geometry->size.h; | 264 | view->desired_height = geometry->size.h; |
@@ -274,7 +274,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo | |||
274 | } | 274 | } |
275 | 275 | ||
276 | static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit state, bool toggle) { | 276 | static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit state, bool toggle) { |
277 | swayc_t *c = swayc_by_handle(view); | 277 | swayc_t *c = swayc_by_test(test_handle, &view); |
278 | switch (state) { | 278 | switch (state) { |
279 | case WLC_BIT_FULLSCREEN: | 279 | case WLC_BIT_FULLSCREEN: |
280 | // i3 just lets it become fullscreen | 280 | // i3 just lets it become fullscreen |