#include "openbox.h"
#include "config.h"
#include "obt/prop.h"
+#include "obt/keyboard.h"
#include "obrender/theme.h"
#define PADDING 2
}
}
+ObtIC* menu_frame_ic(ObMenuFrame *self)
+{
+ /* menus are always used through a grab right now, so they can always use
+ the grab input context */
+ return grab_input_context();
+}
+
static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry,
ObMenuFrame *frame)
{
void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
gint *dx, gint *dy)
{
- Rect *a = NULL;
+ Rect const *a = NULL;
gint pos, half;
*dx = *dy = 0;
*dx = MAX(*dx, a->x - x);
*dy = MAX(*dy, a->y - y);
}
-
- g_free(a);
}
static void menu_entry_frame_render(ObMenuEntryFrame *self)
static void menu_frame_update(ObMenuFrame *self)
{
GList *mit, *fit;
- Rect *a;
+ Rect const *a;
gint h;
menu_pipe_execute(self->menu);
}
}
- g_free(a);
-
menu_frame_render(self);
}
GSList *acts = self->entry->data.normal.actions;
ObClient *client = self->frame->client;
ObMenuFrame *frame = self->frame;
+ guint mods = obt_keyboard_only_modmasks(state);
/* release grabs before executing the shit */
- if (!(state & ControlMask)) {
+ if (!(mods & ControlMask)) {
event_cancel_all_key_grabs();
frame = NULL;
}