summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-11 22:34:13 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-11 22:34:13 +0200
commit5390e6def6dba28f6fa35d06d5f4b2c698b2eb07 (patch)
treeff1f88b7db482839b1bf38951cf572782f1faa09 /plugins
parent08acc7cd6c0f6b7e1bba1b7c70cfaf16dda836f3 (diff)
hotkeys: fixed global hotkeys on 64bit
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hotkeys/hotkeys.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index 38e69e87..c1ccbcc1 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -33,8 +33,8 @@
#include "../../deadbeef.h"
#include "actionhandlers.h"
-//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
-#define trace(fmt,...)
+#define trace(...) { fprintf(stderr, __VA_ARGS__); }
+//#define trace(fmt,...)
static DB_hotkeys_plugin_t plugin;
DB_functions_t *deadbeef;
@@ -79,7 +79,7 @@ static int command_count = 0;
#ifndef __APPLE__
static void
-init_mapped_keycodes (Display *disp, int *syms, int first_kk, int last_kk, int ks_per_kk) {
+init_mapped_keycodes (Display *disp, Atom *syms, int first_kk, int last_kk, int ks_per_kk) {
int i, ks;
for (i = 0; i < last_kk-first_kk; i++)
{
@@ -231,7 +231,7 @@ find_action_by_name (const char *command, int *is_14_action) {
#ifndef __APPLE__
static int
-get_x11_keycode (const char *name, int *syms, int first_kk, int last_kk, int ks_per_kk) {
+get_x11_keycode (const char *name, Atom *syms, int first_kk, int last_kk, int ks_per_kk) {
int i, ks;
for (i = 0; i < last_kk-first_kk; i++)
@@ -252,10 +252,10 @@ static int
read_config (Display *disp) {
int ks_per_kk;
int first_kk, last_kk;
- int* syms;
+ Atom* syms;
XDisplayKeycodes (disp, &first_kk, &last_kk);
- syms = (int *)XGetKeyboardMapping (disp, first_kk, last_kk - first_kk, &ks_per_kk);
+ syms = XGetKeyboardMapping (disp, first_kk, last_kk - first_kk, &ks_per_kk);
#else
#define ShiftMask (1<<0)
#define LockMask (1<<1)
@@ -516,9 +516,9 @@ hotkeys_connect (void) {
int ks_per_kk;
int first_kk, last_kk;
- int* syms;
+ Atom* syms;
XDisplayKeycodes (disp, &first_kk, &last_kk);
- syms = (int *)XGetKeyboardMapping (disp, first_kk, last_kk - first_kk, &ks_per_kk);
+ syms = XGetKeyboardMapping (disp, first_kk, last_kk - first_kk, &ks_per_kk);
init_mapped_keycodes (disp, syms, first_kk, last_kk, ks_per_kk);
XFree (syms);
XSync (disp, 0);