… | |
… | |
7 | clickthrough - make window "transparent" with respect to input events |
7 | clickthrough - make window "transparent" with respect to input events |
8 | |
8 | |
9 | =head1 DESCRIPTION |
9 | =head1 DESCRIPTION |
10 | |
10 | |
11 | This extension can toggle the terminal window between "normal" and |
11 | This extension can toggle the terminal window between "normal" and |
12 | "clickthrough" states. In the latter state, inoput events such as clicks |
12 | "clickthrough" states. In the latter state, input events such as clicks |
13 | will go "through" the window, as if it weren't there. This cna be used to |
13 | will go "through" the window, as if it weren't there. This can be used to |
14 | put a (preferably partially transparent) window in front of other windows |
14 | put a (preferably partially transparent) window in front of other windows |
15 | and let clicks and other events go through the underlying window. |
15 | and let clicks and other events go through the underlying window. |
16 | |
16 | |
17 | See L<https://shallowsky.com/blog/2017/Apr/06/> for an example. |
17 | See L<https://shallowsky.com/blog/2017/Apr/06/> for an example. |
18 | |
18 | |
… | |
… | |
21 | |
21 | |
22 | =over |
22 | =over |
23 | |
23 | |
24 | =item C<disable> (the default) |
24 | =item C<disable> (the default) |
25 | |
25 | |
26 | In this mode, everything works normally andf the OSC sequence is not |
26 | In this mode, everything works normally and the OSC sequence is not |
27 | active. |
27 | active. |
28 | |
28 | |
29 | =item C<on> |
29 | =item C<on> |
30 | |
30 | |
31 | In this mode, events go through the window, and this can be toggled via an |
31 | In this mode, events go through the window, and this can be toggled via an |
… | |
… | |
54 | known that handles this correctly is openbox 3.7 (and partially 3.6). |
54 | known that handles this correctly is openbox 3.7 (and partially 3.6). |
55 | |
55 | |
56 | A workaround is to also use C<-override-redirect>. |
56 | A workaround is to also use C<-override-redirect>. |
57 | |
57 | |
58 | In addition, input shapes don't seem to be well supported in Xorg, |
58 | In addition, input shapes don't seem to be well supported in Xorg, |
59 | which sometimes doe snot egenerate the necessary events for window |
59 | which sometimes does not generate the necessary events for window |
60 | managers. This is currenty being worked around in this extension by |
60 | managers. This is currently being worked around in this extension by |
61 | re-setting the input shape after every map event. |
61 | re-setting the input shape after every map event. |
62 | |
62 | |
63 | =cut |
63 | =cut |
64 | |
64 | |
65 | sub on_start { |
65 | sub on_start { |
… | |
… | |
96 | } |
96 | } |
97 | }); |
97 | }); |
98 | |
98 | |
99 | # at least my x-server does not send a ShapeNotify event to the window manager |
99 | # at least my x-server does not send a ShapeNotify event to the window manager |
100 | # for input shapes unless the window is mapped. Works for bounding shapes, so |
100 | # for input shapes unless the window is mapped. Works for bounding shapes, so |
101 | # this is likely an X bug, which we work maround by setting the mask on every map |
101 | # this is likely an X bug, which we work around by setting the mask on every map |
102 | #$self->{on_map_notify} = $self->on (map_notify => $set_mode); |
102 | #$self->{on_map_notify} = $self->on (map_notify => $set_mode); |
103 | } |
103 | } |
104 | |
104 | |
105 | () |
105 | () |
106 | } |
106 | } |