Skip to content

Commit

Permalink
get rid of all compiler errors!
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
  • Loading branch information
Ryan P.C. McQuen committed Sep 25, 2015
1 parent 75e474d commit e256bb6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions superkey-launch.c
Expand Up @@ -83,8 +83,14 @@ void intercept (XPointer user_data, XRecordInterceptData *data);

KeyMap_t *parse_mapping (Display *ctrl_conn, char *mapping, Bool debug);

void delete_mapping (KeyMap_t *map);

Key_t *key_add_key (Key_t *keys, KeyCode key);

void delete_keys (Key_t *keys);

void print_usage (const char *program_name);

/************************************************************************
* Main function
***********************************************************************/
Expand All @@ -94,12 +100,19 @@ int main (int argc, char **argv)
int dummy, ch;
static char default_mapping[] = "Super_L=Alt_L|F2";
char *mapping = default_mapping;

XRecordRange *rec_range = XRecordAllocRange();
XRecordClientSpec client_spec = XRecordAllClients;

self->debug = False;
self->timeout.tv_sec = 0;
self->timeout.tv_usec = 500000;
self->timeout_valid = True;
self->generated = NULL;

rec_range->device_events.first = KeyPress;
rec_range->device_events.last = ButtonRelease;

while ((ch = getopt (argc, argv, "de:t:")) != -1)
{
switch (ch)
Expand Down Expand Up @@ -189,12 +202,6 @@ int main (int argc, char **argv)
pthread_create (&self->sigwait_thread,
NULL, sig_handler, self);

/* added these back in, even though upstream removed them, they seem to be breaking compilation */
XRecordRange *rec_range = XRecordAllocRange();
rec_range->device_events.first = KeyPress;
rec_range->device_events.last = ButtonRelease;
XRecordClientSpec client_spec = XRecordAllClients;

self->record_ctx = XRecordCreateContext (self->ctrl_conn,
0, &client_spec, 1, &rec_range, 1);

Expand Down

0 comments on commit e256bb6

Please sign in to comment.