Commit graph

111 commits

Author SHA1 Message Date
Richard Acayan
896a02580b wayland: surface: add function for releasing a buffer
Releasing the current buffer has no major effect because the program is
double-buffered, but add a function to release the buffer anyway.
2024-07-24 22:32:00 -04:00
Richard Acayan
a9f3010076 wayland: dispatcher: listen for input method (de-)activate events
Hide the keyboard by default and show it when the user is in some text
field.
2024-07-24 22:32:00 -04:00
Richard Acayan
b5d09e655b wayland: surface: add show/hide functionality
While the keyboard is running, it may want to automatically show or hide
itself depending on whether a text input is active. Add functions to
show and hide the surface by destroying and re-creating it.

Phosh's compositor, phoc, does not emit configure events in reaction to
a surface being committed with no buffer attached. The complicated
surface creation/destruction process is for compatibility with phoc.
2024-07-24 22:31:59 -04:00
Richard Acayan
53f4daedc0 core: button: add HeldPressed and HeldLockedPressed modifier state
The Held state is for modifier that should be off when the corresponding
key is released. If the user presses the modifier key and a normal key,
it would be in this state. The modifier would continue to be active when
the user moves to a different key part (a cancel, e.g. from Fn to Alt)
afterwards. To fix this, add the HeldPressed and HeldLockedPressed
states that reset to the Released state when cancelled.
2024-07-24 20:52:23 -04:00
Richard Acayan
90a32cc50c core: layout: fix indentation in is_label_modifier 2024-07-22 21:30:14 -04:00
Richard Acayan
eb61256b2c wayland: keyboard: skip duplicate key symbols in layout
This has no implications right now.
2024-07-19 17:12:30 -04:00
Richard Acayan
9ec712bb69 core: graphics: use saturating_add for copying images
High-level language skill issue :P
2024-07-19 17:10:28 -04:00
Richard Acayan
c1c92c4d5e wayland: keyboard: release keys while the keymap is changing
Keeping the keys pressed can confuse some compositors, and the key codes
may change. Release any keys that are pressed while the keymap is
changing, and press them again afterwards.
2024-07-19 17:07:04 -04:00
Richard Acayan
4a6b261be0 rewrite in rust 2024-07-18 20:32:55 -04:00
Richard Acayan
d43f61ec76 wayland: release unused buffers after buffer swap
When the surface attaches to a buffer, all other buffers are available.
Export the function used to release a buffer, track the buffer used by
the surface, and release unused buffers when a new buffer is attached.
2024-04-22 19:29:37 -04:00
Richard Acayan
1c606d0274
initial commit 2024-04-15 22:11:20 -04:00