From ca730b236f848f22a138435c4a645c15e0c5e6ea Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 3 Sep 2013 22:37:57 +0200 Subject: Fix negative-sized frames --- src/mainwindow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mainwindow.c') diff --git a/src/mainwindow.c b/src/mainwindow.c index 714b3ac..0830b02 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1440,6 +1440,16 @@ static struct frame *create_frame(struct presentation *p, double x, double y, parent = p->selection[0]; } + if ( w < 0.0 ) { + x += w; + w = -w; + } + + if ( h < 0.0 ) { + y += h; + h = -h; + } + fr = add_subframe(parent); fr->sc = NULL; fr->style = default_style(p->ss); -- cgit v1.2.3