Add clipboard change events and configurable split tab bars in eterm and fixed scrolling tests.

- Translate SDL2 and SDL3 clipboard updates into ClipboardChanged events.
- Expose Unknown, Self, and External clipboard ownership metadata.
- Add regression tests for event dispatch and ownership defaults.
- Add a persisted eterm setting controlling tab bars in split panes.
- Fixed both scrolling tests. SDL2 starts text input automatically on desktop, so the first Space waited for a text event the key-only test never sent.
This commit is contained in:
Martín Lucas Golini
2026-09-29 19:38:19 -03:00
parent a8eb1834eb
commit f8f5627f77
10 changed files with 97 additions and 0 deletions
+18
View File
@@ -169,6 +169,19 @@ class InputEvent {
Int32 length;
};
/** Clipboard ownership when the backend generated the notification. */
enum class ClipboardOwner : Uint8 {
Unknown, /**< Clipboard ownership is unknown or unavailable. */
Self, /**< This application owns the clipboard. */
External /**< This application does not own the clipboard. */
};
/** Clipboard change metadata. Query Clipboard for the current contents and MIME types.
* Initialize owner explicitly when injecting a ClipboardChanged event. */
struct ClipboardEvent {
ClipboardOwner owner;
};
/** The "quit requested" event */
struct QuitEvent {
Uint8 type;
@@ -214,6 +227,10 @@ class InputEvent {
TextDropped,
TextEditing,
MouseWheel,
/** Clipboard notification, including self-writes when reported by the backend.
* WinID is 0; query Clipboard for the current contents. SDL2 may also report PRIMARY
* changes. */
ClipboardChanged,
EventUser,
EventCount = EventUser - 1
};
@@ -245,6 +262,7 @@ class InputEvent {
UserEvent user;
WheelEvent wheel;
SysWMEvent syswm;
ClipboardEvent clipboard;
};
};