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

i3bar: “relative_x” and “width” properties of a click event include separator width #3380

Closed
shdown opened this Issue Aug 31, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@shdown
Contributor

shdown commented Aug 31, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

When clicking a block, i3bar includes the seprator width to “relative_x” and “width” properties, which does not make much sense if I want to calculate the ratio at which a gauge block was clicked.

Expected Behavior

Separator width is not included (subtracted from what i3bar currently reports), and, if relative_x_as_reported_by_now - separator_width < 0, probably the click event is not reported at all.

Alternatively, a new property like separator_width is introduced.

Environment

Output of i3 --moreversion 2>&-:

i3 version: 
Binary i3 version:  4.15-190-g4b3ff9cd (2018-08-09, branch "next") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15-190-g4b3ff9cd (2018-08-09, branch "next") (pid 573)
Loaded i3 config: /home/v/.config/i3/config (Last modified: Fri 31 Aug 2018 06:33:39 PM MSK, 996 seconds ago)

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

@i3bot i3bot added the bug label Aug 31, 2018

@i3bot

This comment has been minimized.

Show comment
Hide comment
@i3bot

i3bot Aug 31, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

i3bot commented Aug 31, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Sep 3, 2018

Member

I haven't verified this, but if this is the case, we should definitely fix it the way you described it by sending correct values (not new properties). I don't consider this change breaking since really it's a bug of what is intended.

Member

Airblader commented Sep 3, 2018

I haven't verified this, but if this is the case, we should definitely fix it the way you described it by sending correct values (not new properties). I don't consider this change breaking since really it's a bug of what is intended.

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Sep 5, 2018

Fix "relative_x" and "width" of click events
Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Sep 6, 2018

Fix "relative_x" and "width" of click events
Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Sep 16, 2018

Fix "relative_x" and "width" of click events
Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.

@Airblader Airblader closed this in #3386 Sep 16, 2018

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