<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch releases/1.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2019-12-02T20:32:09Z</updated>
<entry>
<title>input: discard canceled compose sequences</title>
<updated>2019-12-02T20:32:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-12-02T20:32:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f1c876884acb416120539fae6d51076f5ad61b0b'/>
<id>urn:sha1:f1c876884acb416120539fae6d51076f5ad61b0b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: mouse reporting functions no longer take modifier state</title>
<updated>2019-11-30T16:11:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-30T16:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fbeb1e96103681b6a3fac49443e64ed13ae28737'/>
<id>urn:sha1:fbeb1e96103681b6a3fac49443e64ed13ae28737</id>
<content type='text'>
The mouse reporting functions are called from input when we receive
Wayland mouse events.

We used to pass the current keyboard modifier (shift, alt, ctrl, etc)
to the terminal functions.

This however is wrong, since we may receive Wayland mouse events
without having keyboard focus. When we don't have keyboard focus, the
modifier state doesn't apply to us.

Remove the modifier arguments from the terminal mouse reporting
functions. These functions now read this state directly instead, but
only when the terminal instance in question has keyboard focus.
</content>
</entry>
<entry>
<title>input: doh! mouse_scroll: first argument to keyboard_key() is a struct wayland</title>
<updated>2019-11-30T15:54:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-30T15:54:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=664041d04f7ace891914eea98a781ba5c9372a70'/>
<id>urn:sha1:664041d04f7ace891914eea98a781ba5c9372a70</id>
<content type='text'>
This is the problem with void* user data pointers in callbacks...
</content>
</entry>
<entry>
<title>input: mouse_scroll: cache XKB_KEY_Up and XKB_KEY_Down</title>
<updated>2019-11-30T15:48:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-30T15:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6aa14ccdfcaf2cf5b76bc645bd6ab20f59932672'/>
<id>urn:sha1:6aa14ccdfcaf2cf5b76bc645bd6ab20f59932672</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: update xcursor on terminal with *keyboard* focus when modifiers change</title>
<updated>2019-11-30T11:02:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-30T11:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=841e20b75bebf6a5d8cc0133f64d1eef01dd4e91'/>
<id>urn:sha1:841e20b75bebf6a5d8cc0133f64d1eef01dd4e91</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: pointer-leave: reset moused *before* doing anything else</title>
<updated>2019-11-29T21:13:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-29T21:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2c12549f931afe5f8f10bcbab4cd4b4407b31428'/>
<id>urn:sha1:2c12549f931afe5f8f10bcbab4cd4b4407b31428</id>
<content type='text'>
And update xcursor. This is currently not necessary, but doesn't hurt.
</content>
</entry>
<entry>
<title>input: pointer-enter: add debug log</title>
<updated>2019-11-29T21:12:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-29T21:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6947928a7ff1c983a9915831c76fd0413eccb351'/>
<id>urn:sha1:6947928a7ff1c983a9915831c76fd0413eccb351</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: keyboard_leave: reset focused *before* doing anything else</title>
<updated>2019-11-29T21:11:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-29T21:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6b9837056e7c590bab299ea44a642cc5b85e4173'/>
<id>urn:sha1:6b9837056e7c590bab299ea44a642cc5b85e4173</id>
<content type='text'>
And update xcursor. This is necessary since we may still have mouse
focus. But without keyboard focus, we don't display the 'text'
xcursor.
</content>
</entry>
<entry>
<title>input: keyboard/pointer_leave: warn if we didn't see corresponding enter event</title>
<updated>2019-11-28T18:47:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-28T18:47:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2956a7d47282a1b1b9a0a7aab694eb41a01a4915'/>
<id>urn:sha1:2956a7d47282a1b1b9a0a7aab694eb41a01a4915</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: keyboard/pointer_enter: assert surface != NULL</title>
<updated>2019-11-28T18:46:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-28T18:46:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a319cc813c7810addf2efada354d0fa7feaf15a1'/>
<id>urn:sha1:a319cc813c7810addf2efada354d0fa7feaf15a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminal: use the 'text' xcursor pointer whenever selection is possible</title>
<updated>2019-11-28T18:35:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-28T18:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0dd37f0a364fc36284dad17e8fb1345714261a4a'/>
<id>urn:sha1:0dd37f0a364fc36284dad17e8fb1345714261a4a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: pointer_button: apply same workaround as in pointer_motion</title>
<updated>2019-11-28T18:26:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-28T18:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=729ba8b8ac10537938f2bceb7c38e3fa5780df9a'/>
<id>urn:sha1:729ba8b8ac10537938f2bceb7c38e3fa5780df9a</id>
<content type='text'>
Sway 1.2 has been seen to send pointer_button events without first
having sent pointer_enter.
</content>
</entry>
<entry>
<title>input: sway 1.2 bug: keyboard_leave() called with surface == NULL</title>
<updated>2019-11-28T18:24:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-28T18:24:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9efa28b4c66c2183d65085c6491732187fded12a'/>
<id>urn:sha1:9efa28b4c66c2183d65085c6491732187fded12a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: document why wayl-&gt;focused may be NULL</title>
<updated>2019-11-23T23:06:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-23T23:06:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e333bd2176ee3c9ec5aaa8864b36b9bcdf7e3b6f'/>
<id>urn:sha1:e333bd2176ee3c9ec5aaa8864b36b9bcdf7e3b6f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: improve behavior when sway bugs out</title>
<updated>2019-11-22T21:28:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-22T21:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1a68a7cf0b6155417c3123593fccf78202106474'/>
<id>urn:sha1:1a68a7cf0b6155417c3123593fccf78202106474</id>
<content type='text'>
When we receive a keyboard_key or pointer_motion event without first
having received a keyboard_enter or pointer_enter event (that being
the "sway bugs" part), we generally don't know _which_ terminal window
the event was intended for.

However, if we only have *one* window open (always the case for a
regular 'foot' process, or when there's a single footclient connected
to a foot server process), then obviously we can "guess" which window
the event was intended for... so do that.

Now, the only time the event is ignored is when we're a server process
with more than one window open (= more than one footclient connected).
</content>
</entry>
<entry>
<title>input: use xkb_keymap_key_repeats() to determine if we should start repeat timer</title>
<updated>2019-11-22T21:19:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-22T21:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=937fd6933b774a036a30978307ec3f6114e97552'/>
<id>urn:sha1:937fd6933b774a036a30978307ec3f6114e97552</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: keyboard_key: don't start repeater unless we generated output</title>
<updated>2019-11-22T21:02:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-22T21:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd82ffdf523c7208f24edae006d4023e59f38a00'/>
<id>urn:sha1:fd82ffdf523c7208f24edae006d4023e59f38a00</id>
<content type='text'>
I.e. what we're effectively doing is *not* repeating modifier
keys.

Besides being the "right" thing to do, this also works around another
Sway 1.2 bug, where being in a focused foot window and then switching
to a vt and back would cause us to be stuck in an endless key repeat
loop that would only stop when unfocusing, focusing back and then
unfocusing once again.
</content>
</entry>
<entry>
<title>input: workaround buggy Sway sending bad input events</title>
<updated>2019-11-22T21:00:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-22T20:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9d24e68e6298f4ca2968c2950c316b72a9ddb03c'/>
<id>urn:sha1:9d24e68e6298f4ca2968c2950c316b72a9ddb03c</id>
<content type='text'>
Sway 1.2 has been seen sending keyboard_key() events without first
sending a keyboard_enter() event.

This can be triggered by:

1. start a foot terminal
2. unfocus it (move focus to another window)
3. switch to a vt
4. switch back to sway
5. focus the foot terminal

At this point, Sway will *not* send the keyboard_enter() event, but
instead send a keyboard_key() event.

(furthermore, if you now unfocus the window again, sway will send a
keyboard_leave() event, still without having sent a keyboard_enter()
event).

Sway has _also_ been seen crashing in wl_pointer_motion(). Though this
was in a build without proper debug information, everything points to
a similar issue - i.e. sway is sending a motion event without first
having sent an enter event.

Workaround this by detecting this and logging a warning the first time
it happens. The event is then ignored.
</content>
</entry>
<entry>
<title>keyboard repeat: pass current input serial to keyboard_key()</title>
<updated>2019-11-22T20:55:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-22T20:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=34eac2dbe3d3e4332ebd5ea5ff4307f773b1b6f0'/>
<id>urn:sha1:34eac2dbe3d3e4332ebd5ea5ff4307f773b1b6f0</id>
<content type='text'>
This fixes an assertion when holding in ctrl+shift+c (copy to
clipboard); subsequent "presses" would set the clipboard serial to 0,
which we would then assert on in the next iteration when we tried to
cancel the previous copy.
</content>
</entry>
<entry>
<title>input: may get keyboard_exit() event with no focused terminal</title>
<updated>2019-11-21T17:17:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-21T17:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8c945c9832f94835cd6482a6525217cd21da08af'/>
<id>urn:sha1:8c945c9832f94835cd6482a6525217cd21da08af</id>
<content type='text'>
This happens on Sway when exiting a screen locker. Or at least that's
when we see the problem; it's unclear if the event occurs when
starting the screen locker, or when exiting it. Or maybe its both.

Anyway, don't try to unfocus a NULL-terminal.
</content>
</entry>
</feed>
