summaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-09-12 10:29:11 -0400
committerDrew DeVault <[email protected]>2015-09-12 10:29:11 -0400
commit9c8f1fb9649c5673cd6b42230c0784f099a62db7 (patch)
treebb5eccfddb8b8d56e387327908490daeca2c42a7 /sway/handlers.c
parentf5343adae4d631e4cdade7869b4d73fc97b4ac5f (diff)
parentf76f9e2eea15ee4606c23139e9a4c8ce41a4ab18 (diff)
Merge pull request #179 from taiyu-len/master
new_workspace null behavior + testmap functions + regex
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