/* you cannot call ShowMenu from inside a menu */
if (data->uact != OB_USER_ACTION_MENU_SELECTION && o->name)
- menu_show(o->name, position, monitor,
+ menu_show(o->name, &position, monitor,
data->button != 0, o->use_position, data->client);
return FALSE;
return FALSE; /* no repeat */
}
-void menu_show(gchar *name, GravityPoint pos, gint monitor,
+void menu_show(gchar *name, const GravityPoint *pos, gint monitor,
gboolean mouse, gboolean user_positioned, ObClient *client)
{
ObMenu *self;
void menu_show_all_shortcuts(ObMenu *self, gboolean show);
-void menu_show(gchar *name, GravityPoint pos, gint monitor,
+void menu_show(gchar *name, const GravityPoint *pos, gint monitor,
gboolean mouse, gboolean user_positioned,
struct _ObClient *client);
gboolean menu_hide_delay_reached(void);
XMoveWindow(obt_display, self->window, self->area.x, self->area.y);
}
-static void menu_frame_place_topmenu(ObMenuFrame *self, GravityPoint *pos,
+static void menu_frame_place_topmenu(ObMenuFrame *self, const GravityPoint *pos,
gint *x, gint *y, gint monitor,
gboolean user_positioned)
{
return TRUE;
}
-gboolean menu_frame_show_topmenu(ObMenuFrame *self, GravityPoint pos,
+gboolean menu_frame_show_topmenu(ObMenuFrame *self, const GravityPoint *pos,
gint monitor, gboolean mouse,
gboolean user_positioned)
{
return FALSE;
if (self->menu->place_func) {
- x = pos.x.pos;
- y = pos.y.pos;
+ x = pos->x.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);
}
void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
gint *dx, gint *dy);
-gboolean menu_frame_show_topmenu(ObMenuFrame *self, GravityPoint pos,
+gboolean menu_frame_show_topmenu(ObMenuFrame *self, const GravityPoint *pos,
gint monitor, gboolean mouse,
gboolean user_positioned);
gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
}
void screen_apply_gravity_point(gint *x, gint *y, gint width, gint height,
- GravityPoint *position, const Rect *area)
+ const GravityPoint *position, const Rect *area)
{
if (position->x.center)
*x = area->width / 2 - width / 2;
* width and height are the size of the object being placed, used for
* aligning to right/bottom edges of the area. */
void screen_apply_gravity_point(gint *x, gint *y, gint width, gint height,
- GravityPoint *position, const Rect *area);
+ const GravityPoint *position, const Rect *area);
#endif