New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindsym within `bar { }` ignored if `--release` is added #3068

Closed
AloisMahdal opened this Issue Dec 6, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@AloisMahdal

AloisMahdal commented Dec 6, 2017

Output of i3 --moreversion 2>&- || i3 --version:

Binary i3 version:  4.14.1-2-g2eca0f02 (2017-09-24, branch "master") © 2009 Michael Stapelberg and contributors
(Getting version from running i3, press ctrl-c to abort…)
Running i3 version: 4.14.1-2-g2eca0f02 (2017-09-24, branch "master") (pid 1829)
Loaded i3 config: /home/amahdal/.i3/config (Last modified: Wed 06 Dec 2017 10:04:21 PM CET, 164 seconds ago)

The i3 binary you just called: /usr/local/bin/i3
The i3 binary you are running: i3

URL to a logfile as per https://i3wm.org/docs/debugging.html:

(sorry, I don't have logfile.)

What I did:

Having

bar {
    bindsym button3 exec foo
}

works fine: 'foo' is executed on button3 press. However, adding --release leads to the binding being ignored:

bar {
    bindsym --release button3 exec foo
}

I. e. nothing happens however I click/hold/release on the bar.

What I saw:

Binding was ignored after adding --release. Other bindings in the same block (without the --release flag) continued to work. Bindings outside the bar {} block work as expected, with or without the flag.

What I expected instead:

Bindings inside bar {} should work the same way as outside it.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Dec 6, 2017

Member

This is actually not a bug. The release flag is currently not supported on the bar (despite the consistent name, bindsym in a bar block is a separate directive); the userguide explicitly doesn't list it in the syntax description.

I think adding this feature to i3bar is fine, though. PRs welcome.

Member

Airblader commented Dec 6, 2017

This is actually not a bug. The release flag is currently not supported on the bar (despite the consistent name, bindsym in a bar block is a separate directive); the userguide explicitly doesn't list it in the syntax description.

I think adding this feature to i3bar is fine, though. PRs welcome.

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Dec 8, 2017

Add '--release' flag for bindsym in the bar block
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.

The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
  ...
  bindsym buttonX exec command1
  bindsym --release buttonX exec command2
}

Fixes i3#3068.

@i3 i3 deleted a comment from i3bot Dec 8, 2017

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Dec 8, 2017

Add '--release' flag for bindsym in the bar block
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.

The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
  ...
  bindsym buttonX exec command1
  bindsym --release buttonX exec command2
}

Fixes i3#3068.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment