mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
action: Fix crash in move to edge
Fixes a crash in move to edge ( #77 ) when the centre of the window is out of any display regions. Doesn't fix the expected behaviour that it would work, but much better than the whole compositor dying. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
8e3108c032
commit
f12617deea
1 changed files with 4 additions and 0 deletions
|
|
@ -212,6 +212,10 @@ view_move_to_edge(struct view *view, const char *direction)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
struct output *output = view_output(view);
|
struct output *output = view_output(view);
|
||||||
|
if (!output) {
|
||||||
|
wlr_log(WLR_ERROR, "no output");
|
||||||
|
return;
|
||||||
|
}
|
||||||
struct border border = view_border(view);
|
struct border border = view_border(view);
|
||||||
struct wlr_box usable = output_usable_area_in_layout_coords(output);
|
struct wlr_box usable = output_usable_area_in_layout_coords(output);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue