updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / muine / fix-deprecations.patch
blobfc5074fa2de46ea8ff9415a57d68d0bb39d35202
1 diff -Naur muine-0.8.11.orig/libmuine/mm-keys.c muine-0.8.11/libmuine/mm-keys.c
2 --- muine-0.8.11.orig/libmuine/mm-keys.c 2009-09-13 16:53:58.000000000 +0200
3 +++ muine-0.8.11/libmuine/mm-keys.c 2011-11-24 21:05:50.095572712 +0100
4 @@ -133,11 +133,11 @@
6 display = gdk_display_get_default ();
8 - keycodes[0] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev);
9 - keycodes[1] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext);
10 - keycodes[2] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPlay);
11 - keycodes[3] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPause);
12 - keycodes[4] = XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioStop);
13 + keycodes[0] = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPrev);
14 + keycodes[1] = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioNext);
15 + keycodes[2] = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPlay);
16 + keycodes[3] = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPause);
17 + keycodes[4] = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioStop);
19 for (i = 0; i < gdk_display_get_n_screens (display); i++) {
20 screen = gdk_display_get_screen (display, i);
21 @@ -166,35 +166,35 @@
23 gdk_error_trap_push ();
25 - XGrabKey (GDK_DISPLAY (), key_code,
26 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
28 GDK_WINDOW_XID (root), True,
29 GrabModeAsync, GrabModeAsync);
30 - XGrabKey (GDK_DISPLAY (), key_code,
31 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
32 Mod2Mask,
33 GDK_WINDOW_XID (root), True,
34 GrabModeAsync, GrabModeAsync);
35 - XGrabKey (GDK_DISPLAY (), key_code,
36 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
37 Mod5Mask,
38 GDK_WINDOW_XID (root), True,
39 GrabModeAsync, GrabModeAsync);
40 - XGrabKey (GDK_DISPLAY (), key_code,
41 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
42 LockMask,
43 GDK_WINDOW_XID (root), True,
44 GrabModeAsync, GrabModeAsync);
45 - XGrabKey (GDK_DISPLAY (), key_code,
46 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
47 Mod2Mask | Mod5Mask,
48 GDK_WINDOW_XID (root), True,
49 GrabModeAsync, GrabModeAsync);
50 - XGrabKey (GDK_DISPLAY (), key_code,
51 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
52 Mod2Mask | LockMask,
53 GDK_WINDOW_XID (root), True,
54 GrabModeAsync, GrabModeAsync);
55 - XGrabKey (GDK_DISPLAY (), key_code,
56 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
57 Mod5Mask | LockMask,
58 GDK_WINDOW_XID (root), True,
59 GrabModeAsync, GrabModeAsync);
60 - XGrabKey (GDK_DISPLAY (), key_code,
61 + XGrabKey (gdk_x11_get_default_xdisplay(), key_code,
62 Mod2Mask | Mod5Mask | LockMask,
63 GDK_WINDOW_XID (root), True,
64 GrabModeAsync, GrabModeAsync);
65 @@ -218,19 +218,19 @@
67 key = (XKeyEvent *) xevent;
69 - if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPlay) == key->keycode) {
70 + if (XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPlay) == key->keycode) {
71 g_signal_emit (data, signals[MM_PLAYPAUSE], 0, 0);
72 return GDK_FILTER_REMOVE;
73 - } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPause) == key->keycode) {
74 + } else if (XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPause) == key->keycode) {
75 g_signal_emit (data, signals[MM_PLAYPAUSE], 0, 0);
76 return GDK_FILTER_REMOVE;
77 - } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev) == key->keycode) {
78 + } else if (XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioPrev) == key->keycode) {
79 g_signal_emit (data, signals[MM_PREV], 0, 0);
80 return GDK_FILTER_REMOVE;
81 - } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext) == key->keycode) {
82 + } else if (XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioNext) == key->keycode) {
83 g_signal_emit (data, signals[MM_NEXT], 0, 0);
84 return GDK_FILTER_REMOVE;
85 - } else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioStop) == key->keycode) {
86 + } else if (XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XF86XK_AudioStop) == key->keycode) {
87 g_signal_emit (data, signals[MM_STOP], 0, 0);
88 return GDK_FILTER_REMOVE;
89 } else {