Skip to content
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

Ignore mouse bindings on the title bar #2347

Closed
9ary opened this issue May 10, 2016 · 8 comments · Fixed by #2703
Closed

Ignore mouse bindings on the title bar #2347

9ary opened this issue May 10, 2016 · 8 comments · Fixed by #2703
Labels
4.12 accepted Has been approved and is ok to start working on enhancement

Comments

@9ary
Copy link
Contributor

9ary commented May 10, 2016

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

Binary i3 version:  4.12 (2016-03-06, branch "4.12") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.12 (2016-03-06, branch "4.12") (pid 662)

URL to a logfile as per http://i3wm.org/docs/debugging.html:
Doesn't apply.

What I did:
Bindings to focus windows with the mouse wheel.

bindsym --release --border --whole-window button4 focus
bindsym --release --border --whole-window button5 focus

What I saw:
The bindings apply even to the title bar.

What I expected instead:
An option to ignore the bindings on the title bar so that I can scroll through stacked windows.

@i3bot
Copy link

i3bot commented May 10, 2016

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

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions 4.12 labels May 10, 2016
@Airblader
Copy link
Member

Have you tried not adding --border?

@9ary
Copy link
Contributor Author

9ary commented May 10, 2016

Ah yes, I have, forgot to mention it. Same problem.

@Airblader
Copy link
Member

Airblader commented May 10, 2016

Edit: Never mind what I wrote here before.

@Airblader
Copy link
Member

Airblader commented May 10, 2016

This should be the relevant code (src/click.c). The comment says it all:

       /* clicks over a window decoration will always trigger the binding and
           * clicks on the inside of the window will only trigger a binding if
           * the --whole-window flag was given for the binding. */
          if (bind && ((dest == CLICK_DECORATION || bind->whole_window) ||
                       (dest == CLICK_BORDER && bind->border))) {

Edit: This logic seems to be broken already in an unrelated manner as well. I'll open a bug for this.

@Airblader Airblader added enhancement and removed bug labels May 10, 2016
@Airblader
Copy link
Member

OK, back to the proposal. I think this makes sense and would be OK adding another flag for this. The only not-so-nice thing is that to preserve compatibility, we're forced to have it be a --exclude-titlebar flag, i.e., with inverted meaning compared to --whole-window and --border.

@Airblader
Copy link
Member

@stapelberg What are your thoughts?

@stapelberg
Copy link
Member

Sorry for the late reply. I think adding --exclude-titlebar sounds good.

@Airblader Airblader added accepted Has been approved and is ok to start working on and removed missing-log Read the CONTRIBUTING.md file for instructions labels Jun 16, 2016
Airblader added a commit to Airblader/i3-original that referenced this issue Mar 10, 2017
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes i3#2347
Airblader added a commit to Airblader/i3-original that referenced this issue Mar 10, 2017
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes i3#2347
Airblader added a commit to Airblader/i3-original that referenced this issue Apr 30, 2017
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes i3#2347
Airblader added a commit to Airblader/i3-original that referenced this issue Apr 30, 2017
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes i3#2347
stapelberg pushed a commit that referenced this issue May 2, 2017
This introduces the flag --exclude-titlebar for mouse bindings which
allows bindings like

    bindsym --whole-window --border --exclude-titlebar button3 focus

fixes #2347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.12 accepted Has been approved and is ok to start working on enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants