summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-01-06 23:26:34 +0100
committerMikael Magnusson <mikachu@gmail.com>2015-01-06 23:26:45 +0100
commitd7568bc0388fb1b374dc0a8c7afdaa36e7b0f05f (patch)
treeac43cb7cda5886f4b29643242fbda6eb81487f44 /openbox
parent9e4db4e63d2bc00d82ca462c15c1985f27fe972d (diff)
Special case for unusual monitor setup
When no monitor is at (0,0), the screen rect containing all monitors is not at the origin, but screen_apply_gravity_point assumes the passed x/y are relative to the passed area, so adjust them.
Diffstat (limited to 'openbox')
-rw-r--r--openbox/actions/showmenu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbox/actions/showmenu.c b/openbox/actions/showmenu.c
index 0fdd8be2..7411e981 100644
--- a/openbox/actions/showmenu.c
+++ b/openbox/actions/showmenu.c
@@ -109,9 +109,11 @@ static gboolean run_func(ObActionsData *data, gpointer options)
position = o->position;
} else {
+ const Rect *allmon;
monitor = screen_num_monitors;
- position.x.pos = data->x;
- position.y.pos = data->y;
+ allmon = screen_physical_area_monitor(monitor);
+ position.x.pos = data->x - allmon->x;
+ position.y.pos = data->y - allmon->y;
}
/* you cannot call ShowMenu from inside a menu */