mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
edges: better ignore edges of windows not on same output as moving view
This commit is contained in:
parent
d3b0c69ec1
commit
17bad48d87
1 changed files with 15 additions and 13 deletions
28
src/edges.c
28
src/edges.c
|
|
@ -383,6 +383,11 @@ edges_find_neighbors(struct border *nearest_edges, struct view *view,
|
||||||
assert(validator);
|
assert(validator);
|
||||||
assert(nearest_edges);
|
assert(nearest_edges);
|
||||||
|
|
||||||
|
if (!output_is_usable(view->output)) {
|
||||||
|
wlr_log(WLR_DEBUG, "ignoring edge search for view on unsable output");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct border view_edges = { 0 };
|
struct border view_edges = { 0 };
|
||||||
struct border target_edges = { 0 };
|
struct border target_edges = { 0 };
|
||||||
|
|
||||||
|
|
@ -406,22 +411,13 @@ edges_find_neighbors(struct border *nearest_edges, struct view *view,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (output && v->output != output) {
|
if (output && output != v->output && !view_on_output(v, output)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Both view and v must share a common output */
|
||||||
* If view and v are on different outputs, make sure part of
|
if (view->output != v->output && !(view->outputs & v->outputs)) {
|
||||||
* view is actually in the usable area of the output of v.
|
continue;
|
||||||
*/
|
|
||||||
if (view->output != v->output) {
|
|
||||||
struct wlr_box usable =
|
|
||||||
output_usable_area_in_layout_coords(v->output);
|
|
||||||
|
|
||||||
struct wlr_box ol;
|
|
||||||
if (!wlr_box_intersection(&ol, view_geom, &usable)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct border border = ssd_get_margin(v->ssd);
|
struct border border = ssd_get_margin(v->ssd);
|
||||||
|
|
@ -448,6 +444,12 @@ edges_find_outputs(struct border *nearest_edges, struct view *view,
|
||||||
assert(validator);
|
assert(validator);
|
||||||
assert(nearest_edges);
|
assert(nearest_edges);
|
||||||
|
|
||||||
|
if (!output_is_usable(view->output)) {
|
||||||
|
wlr_log(WLR_DEBUG,
|
||||||
|
"ignoring edge search for view on unsable output");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct border view_edges = { 0 };
|
struct border view_edges = { 0 };
|
||||||
struct border target_edges = { 0 };
|
struct border target_edges = { 0 };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue