|
|
@ -167,23 +167,19 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
|
|
|
|
bool is_below_title =
|
|
|
|
bool is_below_title =
|
|
|
|
c_local_y - container_titlebar_height() > 0.001;
|
|
|
|
c_local_y - container_titlebar_height() > 0.001;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Don't switch focus on title mouseover for
|
|
|
|
|
|
|
|
// stacked and tabbed layouts
|
|
|
|
|
|
|
|
// If pointed container is in nested containers which are
|
|
|
|
|
|
|
|
// inside tabbed/stacked layout we should skip them
|
|
|
|
bool do_mouse_focus = true;
|
|
|
|
bool do_mouse_focus = true;
|
|
|
|
|
|
|
|
struct sway_container *p = c->parent;
|
|
|
|
// Don't switch focus on title mouseover for stacked and tabbed
|
|
|
|
while(p) {
|
|
|
|
// layouts
|
|
|
|
if((p->layout == L_TABBED || p->layout == L_STACKED)
|
|
|
|
if(c->parent && (c->parent->layout == L_STACKED
|
|
|
|
|
|
|
|
|| c->parent->layout == L_TABBED)
|
|
|
|
|
|
|
|
&& !is_below_title) {
|
|
|
|
&& !is_below_title) {
|
|
|
|
do_mouse_focus = false;
|
|
|
|
do_mouse_focus = false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
p = p->parent;
|
|
|
|
// If pointed container is in nested container
|
|
|
|
|
|
|
|
// inside tabbed/stacked layout we should skip this nested container
|
|
|
|
|
|
|
|
if(c->parent && c->parent->parent &&
|
|
|
|
|
|
|
|
(c->parent->parent->layout == L_STACKED
|
|
|
|
|
|
|
|
|| c->parent->parent->layout == L_TABBED)
|
|
|
|
|
|
|
|
&& !is_below_title) {
|
|
|
|
|
|
|
|
do_mouse_focus = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(do_mouse_focus) {
|
|
|
|
if(do_mouse_focus) {
|
|
|
|