mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
desktop: Avoid centering views without initial geometry
This commit is contained in:
parent
e465a41c0a
commit
859eba1c6b
2 changed files with 17 additions and 2 deletions
|
|
@ -245,6 +245,10 @@ view_output(struct view *view)
|
|||
static bool
|
||||
view_compute_centered_position(struct view *view, int w, int h, int *x, int *y)
|
||||
{
|
||||
if (w <= 0 || h <= 0) {
|
||||
wlr_log(WLR_ERROR, "view has empty geometry, not centering");
|
||||
return false;
|
||||
}
|
||||
struct output *output = view_output(view);
|
||||
if (!output) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue