summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/container.c8
-rw-r--r--sway/handlers.c3
-rw-r--r--sway/workspace.c3
3 files changed, 4 insertions, 10 deletions
diff --git a/sway/container.c b/sway/container.c
index 3fa9f490..c033f118 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -69,7 +69,7 @@ swayc_t *new_workspace(swayc_t * output, const char *name) {
69 workspace->layout = L_HORIZ; // TODO:default layout 69 workspace->layout = L_HORIZ; // TODO:default layout
70 workspace->width = output->width; 70 workspace->width = output->width;
71 workspace->height = output->height; 71 workspace->height = output->height;
72 workspace->name = strdup(name); 72 workspace->name = strdup(name);
73 workspace->visible = true; 73 workspace->visible = true;
74 74
75 add_child(output, workspace); 75 add_child(output, workspace);
@@ -82,10 +82,10 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) {
82 sway_log(L_DEBUG, "creating container %p around %p", cont, child); 82 sway_log(L_DEBUG, "creating container %p around %p", cont, child);
83 83
84 cont->layout = layout; 84 cont->layout = layout;
85 cont->width = child->width; 85 cont->width = child->width;
86 cont->height = child->height; 86 cont->height = child->height;
87 cont->x = child->x; 87 cont->x = child->x;
88 cont->y = child->y; 88 cont->y = child->y;
89 cont->visible = child->visible; 89 cont->visible = child->visible;
90 90
91 swayc_t *parent = replace_child(child, cont); 91 swayc_t *parent = replace_child(child, cont);
diff --git a/sway/handlers.c b/sway/handlers.c
index 4b1216bc..f95683d0 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -192,9 +192,6 @@ static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct w
192 swayc_t *c = find_container(&root_container, pointer_test, (void *)origin); 192 swayc_t *c = find_container(&root_container, pointer_test, (void *)origin);
193 swayc_t *focused = get_focused_container(&root_container); 193 swayc_t *focused = get_focused_container(&root_container);
194 if (c && c != focused) { 194 if (c && c != focused) {
195 sway_log(L_DEBUG, "Mouse pointer at X: %d, Y: %d", origin->x, origin->y);
196 sway_log(L_DEBUG, "Container to focus on is at X: %d, Y: %d, with W: %d, H: %d", c->x, c->y, c->width, c->height);
197 sway_log(L_DEBUG, "Focused container is at X: %d, Y: %d, with W: %d, H: %d", c->x, c->y, c->width, c->height);
198 sway_log(L_DEBUG, "Switching focus to %p", c); 195 sway_log(L_DEBUG, "Switching focus to %p", c);
199 unfocus_all(&root_container); 196 unfocus_all(&root_container);
200 focus_view(c); 197 focus_view(c);
diff --git a/sway/workspace.c b/sway/workspace.c
index 1f7aeb64..9748c23f 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -106,14 +106,11 @@ void workspace_switch(swayc_t *workspace) {
106 106
107 // set all c_views in the old workspace to the invisible mask if the workspace 107 // set all c_views in the old workspace to the invisible mask if the workspace
108 // is in the same output & c_views in the new workspace to the visible mask 108 // is in the same output & c_views in the new workspace to the visible mask
109
110 container_map(c_workspace, set_mask, &mask); 109 container_map(c_workspace, set_mask, &mask);
111 mask = 2; 110 mask = 2;
112 container_map(workspace, set_mask, &mask); 111 container_map(workspace, set_mask, &mask);
113 wlc_output_set_mask(wlc_get_focused_output(), 2); 112 wlc_output_set_mask(wlc_get_focused_output(), 2);
114 113
115
116 //wlc_output_set_mask(wlc_get_focused_output(), 2);
117 unfocus_all(&root_container); 114 unfocus_all(&root_container);
118 focus_view(workspace); 115 focus_view(workspace);
119 116