aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c12
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) {
static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) {
sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h);
- swayc_t *c = swayc_by_handle(output);
+ swayc_t *c = swayc_by_test(test_handle, &output);
if (!c) return;
c->width = to->w;
c->height = to->h;
@@ -134,7 +134,7 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_
}
static void handle_output_focused(wlc_handle output, bool focus) {
- swayc_t *c = swayc_by_handle(output);
+ swayc_t *c = swayc_by_test(test_handle, &output);
// if for some reason this output doesnt exist, create it.
if (!c) {
handle_output_created(output);
@@ -152,7 +152,7 @@ static bool handle_view_created(wlc_handle handle) {
// Get parent container, to add view in
if (parent) {
- focused = swayc_by_handle(parent);
+ focused = swayc_by_test(test_handle, &parent);
}
if (!focused || focused->type == C_OUTPUT) {
focused = get_focused_container(&root_container);
@@ -221,7 +221,7 @@ static bool handle_view_created(wlc_handle handle) {
static void handle_view_destroyed(wlc_handle handle) {
sway_log(L_DEBUG, "Destroying window %lu", handle);
- swayc_t *view = swayc_by_handle(handle);
+ swayc_t *view = swayc_by_test(test_handle, &handle);
// destroy views by type
switch (wlc_view_get_type(handle)) {
@@ -258,7 +258,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo
// If the view is floating, then apply the geometry.
// Otherwise save the desired width/height for the view.
// This will not do anything for the time being as WLC improperly sends geometry requests
- swayc_t *view = swayc_by_handle(handle);
+ swayc_t *view = swayc_by_test(test_handle, &handle);
if (view) {
view->desired_width = geometry->size.w;
view->desired_height = geometry->size.h;
@@ -274,7 +274,7 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo
}
static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit state, bool toggle) {
- swayc_t *c = swayc_by_handle(view);
+ swayc_t *c = swayc_by_test(test_handle, &view);
switch (state) {
case WLC_BIT_FULLSCREEN:
// i3 just lets it become fullscreen