bool processing; /* whether or not events are processing */
} events;
+extern VbCore vb;
+
/**
* Append an event into the queue.
*/
-void queue_event(GdkEventKey* e)
+void queue_event(GdkEventKey *e)
{
if (vb.mode->id != 'i') {
/* events are only needed for input mode */
events.queue = newqueue;
/* copy memory (otherwise event gets cleared by gdk) */
- GdkEventKey* tmp = malloc(sizeof *tmp);
+ GdkEventKey *tmp = malloc(sizeof *tmp);
memcpy(tmp, e, sizeof *e);
if (tmp == NULL) {
for (int i = 0; i < events.qlen; ++i)
{
- GdkEventKey* event = events.queue[i];
- gtk_main_do_event ((GdkEvent*) event);
+ GdkEventKey *event = events.queue[i];
+ gtk_main_do_event ((GdkEvent *) event);
}
free_events();
#include "main.h"
#include "map.h"
-void queue_event(GdkEventKey* e);
+void queue_event(GdkEventKey *e);
void free_events();
void process_events(bool is_timeout);
bool is_processing_events();
-extern VbCore vb;
-
#endif /* end of include guard: _MAP_H */
gboolean map_keypress(GtkWidget *widget, GdkEventKey* event, gpointer data)
{
if (is_processing_events()) {
- // events are processing, pass all keys unmodified
+ /* events are processing, pass all keys unmodified */
return false;
}