diff options
author | Philipp Rösner <rndxelement@protonmail.com> | 2022-01-05 23:12:20 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-01-11 17:30:32 +0100 |
commit | 628935c96983361f7fbfa3adb1771ef06f8d821a (patch) | |
tree | 96068479a73afa27bef1e75617d26e6e7a6207bc /x11-misc/x2x/files | |
parent | www-apps/icingaweb2: 2.9.3 clean up (diff) | |
download | gentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.tar.gz gentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.tar.bz2 gentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.zip |
x11-misc/x2x: version bump to 1.30
We added an ebuild for x2x-1.30-10.
It uses the current upstream source, which now resides on GitHub.
Also, we removed obsolete patches and refactored the ebuild.
Furthermore, I added myself as a proxied maintainer.
Closes: https://bugs.gentoo.org/754132
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Philipp Roesner <rndxelement@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23668
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Modified-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-misc/x2x/files')
-rw-r--r-- | x11-misc/x2x/files/x2x_1.30-10-keymap.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/x11-misc/x2x/files/x2x_1.30-10-keymap.patch b/x11-misc/x2x/files/x2x_1.30-10-keymap.patch new file mode 100644 index 000000000000..f1d7f543fcf5 --- /dev/null +++ b/x11-misc/x2x/files/x2x_1.30-10-keymap.patch @@ -0,0 +1,80 @@ +--- a./x2x.c ++++ b./x2x.c +@@ -321,6 +321,12 @@ typedef struct _sticky { + KeySym keysym; + } STICKY, *PSTICKY; + ++typedef struct _keymap { ++ struct _keymap * pNext; ++ KeySym from; ++ KeySym to; ++} KEYMAP, *PKEYMAP; ++ + typedef int (*HANDLER)(); /* event handler function */ + + /* These prototypes need the typedefs */ +@@ -377,6 +383,7 @@ static Bool doDpmsMouse = False; + static int logicalOffset= 0; + static int nButtons = 0; + static KeySym buttonmap[N_BUTTONS + 1][MAX_BUTTONMAPEVENTS + 1]; ++static PKEYMAP keymaps = NULL; + static Bool noScale = False; + static int compRegLeft = 0; + static int compRegRight = 0; +@@ -571,7 +578,8 @@ char **argv; + PSHADOW pShadow; + extern char *lawyerese; + PSTICKY pNewSticky; +- KeySym keysym; ++ PKEYMAP pNewKeymap; ++ KeySym keysym,keysym2; + int button; + int eventno; + char *keyname, *argptr; +@@ -703,6 +711,22 @@ char **argv; + } else { + printf("x2x: warning: can't translate %s\n", argv[arg]); + } ++ } else if (!strcasecmp(argv[arg], "-keymap")) { ++ if ((++arg+1) >= argc) Usage(); ++ if (((keysym = XStringToKeysym(argv[arg])) != NoSymbol) && ++ ((keysym2 = XStringToKeysym(argv[arg+1])) != NoSymbol)) { ++ pNewKeymap = (PKEYMAP)malloc(sizeof(KEYMAP)); ++ pNewKeymap->pNext = keymaps; ++ pNewKeymap->from = keysym; ++ pNewKeymap->to = keysym2; ++ keymaps = pNewKeymap; ++#ifdef DEBUG ++ printf("will translate key %s to %s\n", argv[arg],argv[arg+1]); ++#endif ++ } else { ++ printf("x2x: warning: can't translate %s or %s\n", argv[arg],argv[arg+1]); ++ } ++ arg++; + } else if (!strcasecmp(argv[arg], "-buttonmap")) { + if (++arg >= argc) Usage(); + button = atoi(argv[arg]); +@@ -2200,6 +2224,7 @@ XKeyEvent *pEv; + PSHADOW pShadow; + Bool bPress; + PSTICKY pSticky; ++ PKEYMAP pKeymap; + Bool DoFakeShift = False; + KeyCode toShiftCode; + +@@ -2211,6 +2236,15 @@ XKeyEvent *pEv; + XKeysymToString(keysym), (bPress ? "pressed" : "released"), pEv->state); + #endif + ++ for (pKeymap = keymaps; pKeymap; pKeymap = pKeymap->pNext) ++ if (keysym == pKeymap->from) { ++ keysym = pKeymap->to; ++#ifdef DEBUG ++ printf("Key mapped from %x to %x\n", pKeymap->from, pKeymap->to); ++#endif ++ } ++ ++ + /* If CapsLock is on, we need to do some funny business to make sure the */ + /* "to" display does the right thing */ + if(doCapsLkHack && (pEv->state & 0x2)) |