From 64c65f3b67364bb82420dbdd05d7e655b1d74d43 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 21 Mar 2004 00:48:48 +0000 Subject: adds option to have the popup centered above the window instead of centered, and fix the last occurance of that reversed variable --- openbox/moveresize.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'openbox/moveresize.c') diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 68c75129..71241117 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -77,11 +77,17 @@ static void popup_coords(ObClient *c, gchar *format, gint a, gint b) gchar *text; text = g_strdup_printf(format, a, b); - popup_position(popup, CenterGravity, - c->frame->area.x + c->frame->size.left + - c->area.width / 2, - c->frame->area.y + c->frame->size.top + - c->area.height / 2); + if (config_resize_popup_pos == 1) /* == "Top" */ + popup_position(popup, SouthGravity, + c->frame->area.x + + c->frame->area.width/2, + c->frame->area.y); + else /* == "Center" */ + popup_position(popup, CenterGravity, + c->frame->area.x + c->frame->size.left + + c->area.width / 2, + c->frame->area.y + c->frame->size.top + + c->area.height / 2); popup_show(popup, text); g_free(text); } -- cgit v1.2.3