From d3b31bd0a50d202c89c6cf99b47f3d9531e91404 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Mon, 4 May 2020 19:53:28 +0000 Subject: - replace deprecated XKeycodeToKeysym --- x11-wm/afterstep/files/patch-Wharf.c | 29 +++++++++++++++++++++++++++++ x11-wm/afterstep/files/patch-afterstep.c | 29 +++++++++++++++++++++++++++++ x11-wm/afterstep/files/patch-configure.c | 11 +++++++++++ x11-wm/afterstep/files/patch-events.c | 20 ++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 x11-wm/afterstep/files/patch-Wharf.c create mode 100644 x11-wm/afterstep/files/patch-afterstep.c create mode 100644 x11-wm/afterstep/files/patch-configure.c create mode 100644 x11-wm/afterstep/files/patch-events.c (limited to 'x11-wm/afterstep') diff --git a/x11-wm/afterstep/files/patch-Wharf.c b/x11-wm/afterstep/files/patch-Wharf.c new file mode 100644 index 000000000000..579a95741341 --- /dev/null +++ b/x11-wm/afterstep/files/patch-Wharf.c @@ -0,0 +1,29 @@ +--- modules/Wharf/Wharf.c.orig 1997-03-19 01:28:51 UTC ++++ modules/Wharf/Wharf.c +@@ -191,7 +191,7 @@ void FindLockMods(void); + * + *********************************************************************** + */ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *display_name = NULL; + int i,j; +@@ -2267,7 +2267,7 @@ void FindLockMods(void) + for (i = 0; i < mm->max_keypermod; i++) + { + if ((kc = *kp++) && +- ((ks = XKeycodeToKeysym(dpy, kc, 0)) != NoSymbol)) ++ ((ks = XkbKeycodeToKeysym(dpy, kc, 0, 0)) != NoSymbol)) + { + kn = XKeysymToString(ks); + knl = strlen(kn); +@@ -2433,7 +2433,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, in + + *widthp = dwidth; + *heightp = dheight; +- return; ++ return 0; + } + + diff --git a/x11-wm/afterstep/files/patch-afterstep.c b/x11-wm/afterstep/files/patch-afterstep.c new file mode 100644 index 000000000000..3bcae93d04f6 --- /dev/null +++ b/x11-wm/afterstep/files/patch-afterstep.c @@ -0,0 +1,29 @@ +--- afterstep/afterstep.c.orig 1997-05-04 15:19:57 UTC ++++ afterstep/afterstep.c +@@ -147,7 +147,7 @@ char *display_name = NULL; + * + *********************************************************************** + */ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + unsigned long valuemask; /* mask for create windows */ + XSetWindowAttributes attributes; /* attributes for create windows */ +@@ -463,7 +463,7 @@ void main(int argc, char **argv) + + XDefineCursor(dpy, Scr.Root, Scr.ASCursors[DEFAULT]); + HandleEvents(); +- return; ++ return 0; + } + + /*********************************************************************** +@@ -787,7 +787,7 @@ void InitModifiers(void) + for (i = 0; i < mm->max_keypermod; i++) + { + if ((kc = *kp++) && +- ((ks = XKeycodeToKeysym(dpy, kc, 0)) != NoSymbol)) ++ ((ks = XkbKeycodeToKeysym(dpy, kc, 0, 0)) != NoSymbol)) + { + kn = XKeysymToString(ks); + knl = strlen(kn); diff --git a/x11-wm/afterstep/files/patch-configure.c b/x11-wm/afterstep/files/patch-configure.c new file mode 100644 index 000000000000..43929ee92f0e --- /dev/null +++ b/x11-wm/afterstep/files/patch-configure.c @@ -0,0 +1,11 @@ +--- afterstep/configure.c.orig 1997-03-09 00:43:54 UTC ++++ afterstep/configure.c +@@ -2090,7 +2090,7 @@ void AddFuncKey (char *name, int cont, int mods, int f + + XDisplayKeycodes(dpy, &min, &max); + for (i=min; i<=max; i++) +- if (XKeycodeToKeysym(dpy, i, 0) == keysym) ++ if (XkbKeycodeToKeysym(dpy, i, 0, 0) == keysym) + { + tmp = (FuncKey *) safemalloc(sizeof(FuncKey)); + tmp->next = Scr.FuncKeyRoot.next; diff --git a/x11-wm/afterstep/files/patch-events.c b/x11-wm/afterstep/files/patch-events.c new file mode 100644 index 000000000000..bc9fd981a9d1 --- /dev/null +++ b/x11-wm/afterstep/files/patch-events.c @@ -0,0 +1,20 @@ +--- afterstep/events.c.orig 1997-04-26 12:21:36 UTC ++++ afterstep/events.c +@@ -319,7 +319,7 @@ void HandleKeyPress() + * same keysym and different keycodes. This converts all + * the cases to one keycode. */ + Event.xkey.keycode = +- XKeysymToKeycode(dpy,XKeycodeToKeysym(dpy,Event.xkey.keycode,0)); ++ XKeysymToKeycode(dpy,XkbKeycodeToKeysym(dpy,Event.xkey.keycode,0,0)); + if ((key->keycode == Event.xkey.keycode) && + ((key->mods == (modifier&(~LockMask)))|| + (key->mods == AnyModifier)) && +@@ -558,7 +558,7 @@ void HandleExpose() + ReallyRedrawPager(); + } + #endif +- if ((Event.xany.window == Tmp_win->title_w)) ++ if (Event.xany.window == Tmp_win->title_w) + { + SetTitleBar(Tmp_win,(Scr.Hilite == Tmp_win),False); + } -- cgit v1.2.3