i3: Input shapes with holes don't correctly allow input through
Output of i3 --moreversion 2>&- || i3 --version
:
Binary i3 version: 4.13-non-git © 2009 Michael Stapelberg and contributors
Running i3 version: 4.13-non-git (pid 699)rl-c to abort…)
Loaded i3 config: /home/gandalf3/.config/i3/config (Last modified: Wed 12 Apr 2017 11:17:14 PM PDT, 220408 seconds ago)
The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
URL to a logfile as per http://i3wm.org/docs/debugging.html:
http://logs.i3wm.org/logs/5744863563743232.bz2
What I did:
Started peek and clicked on its click-through-able region during recording.
What I saw:
The click was received by peek and not the program underneath. For what its worth, I observed the same behavior with licecap running in wine.
What I expected instead:
Mouse events to be received by the program under peek.
According the the peek developer, this is likely an upstream issue.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 28 (24 by maintainers)
Commits related to this issue
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Add input and bounding shapes support (#2742) Basic idea: if the window has a shape, set the parent container shape as the union of the window shape and the shape of the frame borders. Co-authored-b... — committed to xzfc/i3 by xzfc 6 years ago
- Merge pull request #3514 from xzfc/2742-shape Add input and bounding shapes support (#2742) — committed to i3/i3 by Airblader 6 years ago
+1 to support Shape in i3, even just for this peek killer-app.
I’ve continued the work of @psychon: https://github.com/xzfc/i3/tree/2742-shape. Anyone feel free to take my commit.
Changes made:
XCB_SHAPE_NOTIFY
handling. Also, do not shape windows that should not be shaped.XCB_SHAPE_SK_INPUT
). However it doesn’t work as intended, and I can’t figure why. I can click through input-shaped area, but the click is handled by i3 (resizing) and not by the window underneath.For now peek is usable, but you should disable compositing.
Some clumsy test app: https://gist.github.com/xzfc/d3b28cc800e477a89cb70b7bf081f3cd
@Airblader Here is some start of proper(?) shape support: https://github.com/psychon/i3/tree/shape_support The first commit in that branch just does the shape and xfixes extension initialisation, the second commit actually shapes some windows. At this point I would now have to understand enough of i3 to figure out the geometry of window decorations (so that they can be added to the shape) and find all the places that have to cause a re-shape. Oh and this could be optimised so that the shaping is only done for windows which actually have a shape (which can be checked via
xcb_shape_query_extents
, the fieldbounding_shaped
of the answer is a boolean).I’m out of time for today and if anyone wants, they can pick this up and continue working on it.
(For how the actual shapeing is done here: The XFixes extension introduces the concept of “regions” in version 2. A region can e.g. be created from the shape of a window and can also be used to set the shape of a window. Thus, this allows to “copy” the shape from one window to another without actually having to download the shape from the X11 server. This just needs to add the geometry of window decorations to the shape first so that these stay visible.)
#3514
Oh, hey… https://github.com/danakj/openbox/blob/9e8813e111cbe6c1088f6abbc771a29470f05fc2/openbox/frame.c#L293
xcb_shape_combine
allows to directly copy the shape from one window to another, without the indirection through a region…xcb_shape_rectangles(c, XCB_SHAPE_SO_UNION, ...)
can then add something to that, also without using a region. Interesting and useful. Seems like I was doing this unnecessarily complicated. 😃Please have a look, you can have peek recording stacked and it will work perfectly fine. https://github.com/phw/peek/pull/200
Perhaps some other i3 users could verify 😃