summaryrefslogtreecommitdiff
path: root/openbox/menuframe.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2014-10-06 20:15:08 +0200
committerMikael Magnusson <mikachu@gmail.com>2014-10-06 22:05:26 +0200
commitd3359676e49b558cb7c6e24ea889c037d044b79f (patch)
tree6b6ce9dd03e50ca5c584631999e977ec9a7b0cbf /openbox/menuframe.c
parent1b3afcff1fea0d1334b50dff378a6667e264b557 (diff)
Let the menu placement code know if the position was user specified
This way, it can avoid running the code that moves it to a good position relative to a mouse that isn't there
Diffstat (limited to 'openbox/menuframe.c')
-rw-r--r--openbox/menuframe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c
index 20104542..0c363e70 100644
--- a/openbox/menuframe.c
+++ b/openbox/menuframe.c
@@ -233,13 +233,17 @@ void menu_frame_move(ObMenuFrame *self, gint x, gint y)
}
static void menu_frame_place_topmenu(ObMenuFrame *self, GravityPoint *pos,
- gint *x, gint *y, gint monitor)
+ gint *x, gint *y, gint monitor,
+ gboolean user_positioned)
{
gint dx, dy;
screen_apply_gravity_point(x, y, self->area.width, self->area.height,
pos, screen_physical_area_monitor(monitor));
+ if (user_positioned)
+ return;
+
if (config_menu_middle) {
gint myx;
@@ -994,7 +998,8 @@ static gboolean menu_frame_show(ObMenuFrame *self)
}
gboolean menu_frame_show_topmenu(ObMenuFrame *self, GravityPoint pos,
- gint monitor, gboolean mouse)
+ gint monitor, gboolean mouse,
+ gboolean user_positioned)
{
gint px, py;
gint x, y;
@@ -1009,7 +1014,8 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, GravityPoint pos,
y = pos.y.pos;
self->menu->place_func(self, &x, &y, mouse, self->menu->data);
} else {
- menu_frame_place_topmenu(self, &pos, &x, &y, monitor);
+ menu_frame_place_topmenu(self, &pos, &x, &y, monitor,
+ user_positioned);
}
menu_frame_move(self, x, y);