summaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index bdcdcaa4..6d35f8a2 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -226,7 +226,7 @@ static void handle_output_focused(wlc_handle output, bool focus) {
handle_output_created(output);
}
if (focus) {
- set_focused_container(c);
+ set_focused_container(get_focused_container(c));
}
}
@@ -343,7 +343,6 @@ static bool handle_view_created(wlc_handle handle) {
// Dmenu keeps viewfocus, but others with this flag don't, for now simulate
// dmenu
case WLC_BIT_OVERRIDE_REDIRECT:
- // locked_view_focus = true;
wlc_view_focus(handle);
wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true);
wlc_view_bring_to_front(handle);
@@ -415,7 +414,7 @@ static bool handle_view_created(wlc_handle handle) {
// we were on one workspace, switched to another to add this view,
// now let's return to where we were
workspace_switch(current_ws);
- set_focused_container(current_ws->focused);
+ set_focused_container(get_focused_container(current_ws));
}
suspend_workspace_cleanup = false;
@@ -437,7 +436,6 @@ static void handle_view_destroyed(wlc_handle handle) {
// DMENU has this flag, and takes view_focus, but other things with this
// flag don't
case WLC_BIT_OVERRIDE_REDIRECT:
-// locked_view_focus = false;
break;
case WLC_BIT_OVERRIDE_REDIRECT|WLC_BIT_UNMANAGED:
locked_container_focus = false;
@@ -553,9 +551,9 @@ static void handle_view_properties_updated(wlc_handle view, uint32_t mask) {
swayc_t *p = swayc_tabbed_stacked_ancestor(c);
if (p) {
// TODO: we only got the topmost tabbed/stacked container, update borders of all containers on the path
- update_view_border(get_focused_view(p));
+ update_container_border(get_focused_view(p));
} else if (c->border_type == B_NORMAL) {
- update_view_border(c);
+ update_container_border(c);
}
ipc_event_window(c, "title");
}
@@ -646,10 +644,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
return EVENT_PASSTHROUGH;
}
- if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) {
- return EVENT_PASSTHROUGH;
- }
-
// reset pointer mode on keypress
if (state == WLC_KEY_STATE_PRESSED && pointer_state.mode) {
pointer_mode_reset();