Hello community, here is the log from the commit of package sxhkd for openSUSE:Factory checked in at 2020-06-11 14:53:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sxhkd (Old) and /work/SRC/openSUSE:Factory/.sxhkd.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sxhkd" Thu Jun 11 14:53:23 2020 rev:4 rq:813463 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/sxhkd/sxhkd.changes 2018-05-16 11:44:12.422591532 +0200 +++ /work/SRC/openSUSE:Factory/.sxhkd.new.3606/sxhkd.changes 2020-06-11 14:54:39.655271224 +0200 @@ -1,0 +2,6 @@ +Thu Jun 11 09:58:53 UTC 2020 - Florian Besser <[email protected]> + +- Bump to version 0.6.1 +- Fix gcc10 build, adding -fcommon to CPPFLAGS + +------------------------------------------------------------------- Old: ---- sxhkd-0.5.9.tar.gz New: ---- sxhkd-0.6.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sxhkd.spec ++++++ --- /var/tmp/diff_new_pack.ap1s3i/_old 2020-06-11 14:54:40.903275030 +0200 +++ /var/tmp/diff_new_pack.ap1s3i/_new 2020-06-11 14:54:40.907275041 +0200 @@ -1,7 +1,7 @@ # # spec file for package sxhkd # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2017 Luke Jones, [email protected] # # All modifications and additions to the file contributed by third parties @@ -13,12 +13,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: sxhkd -Version: 0.5.9 +Version: 0.6.1 Release: 0 Summary: Simple X hotkey daemon License: BSD-2-Clause @@ -38,7 +38,7 @@ %setup -q %build -export CPPFLAGS="%{optflags}" +export CPPFLAGS="%{optflags} -fcommon" make %{?_smp_mflags} %install ++++++ sxhkd-0.5.9.tar.gz -> sxhkd-0.6.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/VERSION new/sxhkd-0.6.1/VERSION --- old/sxhkd-0.5.9/VERSION 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/VERSION 2019-08-11 17:57:54.000000000 +0200 @@ -1 +1 @@ -0.5.9 \ No newline at end of file +0.6.1 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/contrib/systemd/sxhkd.service new/sxhkd-0.6.1/contrib/systemd/sxhkd.service --- old/sxhkd-0.5.9/contrib/systemd/sxhkd.service 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/contrib/systemd/sxhkd.service 2019-08-11 17:57:54.000000000 +0200 @@ -1,8 +1,8 @@ [Unit] Description=Simple X Hotkey Daemon Documentation=man:sxhkd(1) -BindsTo=xorg.service -After=xorg.service +BindsTo=display-manager.service +After=display-manager.service [Service] ExecStart=/usr/bin/sxhkd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/doc/sxhkd.1 new/sxhkd-0.6.1/doc/sxhkd.1 --- old/sxhkd-0.5.9/doc/sxhkd.1 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/doc/sxhkd.1 2019-08-11 17:57:54.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: sxhkd .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 03/28/2018 +.\" Date: 08/11/2019 .\" Manual: Sxhkd Manual -.\" Source: Sxhkd 0.5.9 +.\" Source: Sxhkd 0.6.1 .\" Language: English .\" -.TH "SXHKD" "1" "03/28/2018" "Sxhkd 0\&.5\&.9" "Sxhkd Manual" +.TH "SXHKD" "1" "08/11/2019" "Sxhkd 0\&.6\&.1" "Sxhkd Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -73,6 +73,11 @@ .RS 4 Output status information to the given FIFO\&. .RE +.PP +\fB\-a\fR \fIABORT_KEYSYM\fR +.RS 4 +Name of the keysym used for aborting chord chains\&. +.RE .SH "BEHAVIOR" .sp \fBsxhkd\fR is a daemon that listens to keyboard events and execute commands\&. @@ -145,7 +150,7 @@ .sp The valid modifier names are: \fIsuper\fR, \fIhyper\fR, \fImeta\fR, \fIalt\fR, \fIcontrol\fR, \fIctrl\fR, \fIshift\fR, \fImode_switch\fR, \fIlock\fR, \fImod1\fR, \fImod2\fR, \fImod3\fR, \fImod4\fR, \fImod5\fR and \fIany\fR\&. .sp -The keysym names are given by the output of \fBxev\fR\&. +The keysym names are given by the output of \fBxev \-event keyboard\fR\&. .sp Hotkeys and commands can be spread across multiple lines by ending each partial line with a backslash character\&. .sp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/doc/sxhkd.1.asciidoc new/sxhkd-0.6.1/doc/sxhkd.1.asciidoc --- old/sxhkd-0.5.9/doc/sxhkd.1.asciidoc 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/doc/sxhkd.1.asciidoc 2019-08-11 17:57:54.000000000 +0200 @@ -45,6 +45,9 @@ *-s* _STATUS_FIFO_:: Output status information to the given FIFO. +*-a* _ABORT_KEYSYM_:: + Name of the keysym used for aborting chord chains. + Behavior -------- @@ -86,7 +89,7 @@ The valid modifier names are: _super_, _hyper_, _meta_, _alt_, _control_, _ctrl_, _shift_, _mode_switch_, _lock_, _mod1_, _mod2_, _mod3_, _mod4_, _mod5_ and _any_. -The keysym names are given by the output of *xev*. +The keysym names are given by the output of *xev -event keyboard*. Hotkeys and commands can be spread across multiple lines by ending each partial line with a backslash character. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/src/parse.c new/sxhkd-0.6.1/src/parse.c --- old/sxhkd-0.5.9/src/parse.c 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/src/parse.c 2019-08-11 17:57:54.000000000 +0200 @@ -2471,7 +2471,7 @@ if (strcmp(hotkey, last_hotkey) == 0) num_same++; } else { - free(chain); + destroy_chain(chain); } if (hk_chunks == NULL && cm_chunks == NULL) @@ -2671,7 +2671,7 @@ } char *nm = name + offset; if (!parse_modifier(nm, &modfield) && !parse_keysym(nm, &keysym) && !parse_button(nm, &button)) { - warn("Unknown name: '%s'.\n", nm); + warn("Unknown keysym name: '%s'.\n", nm); return false; } } @@ -2680,6 +2680,9 @@ if (button != XCB_NONE) event_type = key_to_button(event_type); chord_t *c = make_chord(keysym, button, modfield, event_type, replay_event, lock_chain); + if (c == NULL) { + return false; + } add_chord(chain, c); if (status_fifo != NULL) { snprintf(c->repr, sizeof(c->repr), "%s", chord); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/src/sxhkd.c new/sxhkd-0.6.1/src/sxhkd.c --- old/sxhkd-0.5.9/src/sxhkd.c 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/src/sxhkd.c 2019-08-11 17:57:54.000000000 +0200 @@ -46,15 +46,16 @@ timeout = TIMEOUT; grabbed = false; redir_fd = -1; + abort_keysym = ESCAPE_KEYSYM; - while ((opt = getopt(argc, argv, "hvm:t:c:r:s:")) != -1) { + while ((opt = getopt(argc, argv, "hvm:t:c:r:s:a:")) != -1) { switch (opt) { case 'v': printf("%s\n", VERSION); exit(EXIT_SUCCESS); break; case 'h': - printf("sxhkd [-h|-v|-m COUNT|-t TIMEOUT|-c CONFIG_FILE|-r REDIR_FILE|-s STATUS_FIFO] [EXTRA_CONFIG ...]\n"); + printf("sxhkd [-h|-v|-m COUNT|-t TIMEOUT|-c CONFIG_FILE|-r REDIR_FILE|-s STATUS_FIFO|-a ABORT_KEYSYM] [EXTRA_CONFIG ...]\n"); exit(EXIT_SUCCESS); break; case 'm': @@ -75,6 +76,11 @@ case 's': fifo_path = optarg; break; + case 'a': + if (!parse_keysym(optarg, &abort_keysym)) { + warn("Invalid keysym name: %s.\n", optarg); + } + break; } } @@ -110,7 +116,7 @@ setup(); get_standard_keysyms(); get_lock_fields(); - escape_chord = make_chord(ESCAPE_KEYSYM, XCB_NONE, 0, XCB_KEY_PRESS, false, false); + abort_chord = make_chord(abort_keysym, XCB_NONE, 0, XCB_KEY_PRESS, false, false); load_config(config_file); for (int i = 0; i < num_extra_confs; i++) load_config(extra_confs[i]); @@ -186,7 +192,7 @@ ungrab(); cleanup(); - destroy_chord(escape_chord); + destroy_chord(abort_chord); xcb_key_symbols_free(symbols); xcb_disconnect(dpy); return EXIT_SUCCESS; @@ -236,10 +242,10 @@ if (e->request == XCB_MAPPING_POINTER) return; if (xcb_refresh_keyboard_mapping(symbols, e) == 1) { - destroy_chord(escape_chord); + destroy_chord(abort_chord); get_lock_fields(); reload_cmd(); - escape_chord = make_chord(ESCAPE_KEYSYM, XCB_NONE, 0, XCB_KEY_PRESS, false, false); + abort_chord = make_chord(abort_keysym, XCB_NONE, 0, XCB_KEY_PRESS, false, false); if (mapping_count > 0) mapping_count--; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/src/sxhkd.h new/sxhkd-0.6.1/src/sxhkd.h --- old/sxhkd-0.5.9/src/sxhkd.h 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/src/sxhkd.h 2019-08-11 17:57:54.000000000 +0200 @@ -59,7 +59,8 @@ hotkey_t *hotkeys_head, *hotkeys_tail; bool running, grabbed, toggle_grab, reload, bell, chained, locked; -chord_t *escape_chord; +xcb_keysym_t abort_keysym; +chord_t *abort_chord; uint16_t num_lock; uint16_t caps_lock; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sxhkd-0.5.9/src/types.c new/sxhkd-0.6.1/src/types.c --- old/sxhkd-0.5.9/src/types.c 2018-03-28 10:36:13.000000000 +0200 +++ new/sxhkd-0.6.1/src/types.c 2019-08-11 17:57:54.000000000 +0200 @@ -92,9 +92,9 @@ if (num_active > 0) { chained = true; put_status(BEGIN_CHAIN_PREFIX, "Begin chain"); - grab_chord(escape_chord); + grab_chord(abort_chord); } - } else if (num_active == 0 || match_chord(escape_chord, event_type, keysym, button, modfield)) { + } else if (num_active == 0 || match_chord(abort_chord, event_type, keysym, button, modfield)) { abort_chain(); return find_hotkey(keysym, button, modfield, event_type, replay_event); } @@ -120,7 +120,7 @@ chord_t *prev = NULL; chord_t *orig = NULL; xcb_keycode_t *keycodes = keycodes_from_keysym(keysym); - if (keycodes != NULL) + if (keycodes != NULL) { for (xcb_keycode_t *kc = keycodes; *kc != XCB_NO_SYMBOL; kc++) { xcb_keysym_t natural_keysym = xcb_key_symbols_get_keysym(symbols, *kc, 0); for (unsigned char col = 0; col < KEYSYMS_PER_KEYCODE; col++) { @@ -154,6 +154,9 @@ } } } + } else { + warn("No keycodes found for keysym %u.\n", keysym); + } free(keycodes); chord = orig; } else { @@ -243,6 +246,7 @@ destroy_chord(c); c = n; } + free(chain); } void destroy_chord(chord_t *chord)
