2019-10-27 13:06:39 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdbool.h>
|
2022-01-15 14:56:13 +05:30
|
|
|
#include <time.h>
|
fcft: adapt to API changes in fcft-3.x
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.
Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.
For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).
Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.
These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.
For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.
FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.
Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.
Other fcft API changes:
* fcft_glyph_rasterize() -> fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
2021-08-21 14:50:42 +02:00
|
|
|
#include <uchar.h>
|
2019-10-27 18:46:36 +01:00
|
|
|
|
2019-10-27 15:57:23 +01:00
|
|
|
#include <wayland-client.h>
|
2022-04-17 16:29:30 +02:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
2019-10-27 15:57:23 +01:00
|
|
|
|
2021-05-09 12:13:14 +02:00
|
|
|
/* Wayland protocols */
|
2025-03-12 17:53:04 +01:00
|
|
|
#include <color-management-v1.h>
|
2023-07-31 16:32:53 +02:00
|
|
|
#include <fractional-scale-v1.h>
|
2019-12-31 15:39:40 +01:00
|
|
|
#include <presentation-time.h>
|
2021-05-09 12:13:14 +02:00
|
|
|
#include <primary-selection-unstable-v1.h>
|
2024-05-21 16:09:34 +02:00
|
|
|
#include <single-pixel-buffer-v1.h>
|
2021-05-09 12:13:14 +02:00
|
|
|
#include <text-input-unstable-v3.h>
|
2023-07-31 16:32:53 +02:00
|
|
|
#include <viewporter.h>
|
|
|
|
|
#include <xdg-activation-v1.h>
|
2021-05-09 12:13:14 +02:00
|
|
|
#include <xdg-decoration-unstable-v1.h>
|
|
|
|
|
#include <xdg-output-unstable-v1.h>
|
|
|
|
|
#include <xdg-shell.h>
|
2025-03-12 17:53:04 +01:00
|
|
|
#include <xdg-system-bell-v1.h>
|
|
|
|
|
#include <xdg-toplevel-icon-v1.h>
|
render: gamma-correct blending
This implements gamma-correct blending, which mainly affects font
rendering.
The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols >= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).
How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.
Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.
Emojis: we require fcft >= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.
Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.
There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.
Perhaps, in the future, we can enable it by default if:
* gamma-correct blending is enabled
* the user has not enabled a transparent background
2025-02-21 11:01:29 +01:00
|
|
|
|
2021-07-22 21:23:59 +02:00
|
|
|
#include <fcft/fcft.h>
|
2019-12-01 13:43:51 +01:00
|
|
|
#include <tllist.h>
|
|
|
|
|
|
2023-06-27 16:57:33 +02:00
|
|
|
#include "cursor-shape.h"
|
2019-10-27 19:08:48 +01:00
|
|
|
#include "fdm.h"
|
2019-10-27 13:06:39 +01:00
|
|
|
|
2020-12-02 18:52:50 +01:00
|
|
|
/* Forward declarations */
|
|
|
|
|
struct terminal;
|
2023-06-26 17:05:16 +02:00
|
|
|
struct buffer;
|
2020-12-02 18:52:50 +01:00
|
|
|
|
2020-10-28 19:16:04 +01:00
|
|
|
/* Mime-types we support when dealing with data offers (e.g. copy-paste, or DnD) */
|
|
|
|
|
enum data_offer_mime_type {
|
|
|
|
|
DATA_OFFER_MIME_UNSET,
|
|
|
|
|
DATA_OFFER_MIME_TEXT_PLAIN,
|
|
|
|
|
DATA_OFFER_MIME_TEXT_UTF8,
|
|
|
|
|
DATA_OFFER_MIME_URI_LIST,
|
2021-06-09 09:51:07 +02:00
|
|
|
|
|
|
|
|
DATA_OFFER_MIME_TEXT_TEXT,
|
|
|
|
|
DATA_OFFER_MIME_TEXT_STRING,
|
|
|
|
|
DATA_OFFER_MIME_TEXT_UTF8_STRING,
|
2020-10-28 19:16:04 +01:00
|
|
|
};
|
|
|
|
|
|
2023-07-05 00:19:21 +08:00
|
|
|
enum touch_state {
|
|
|
|
|
TOUCH_STATE_INHIBITED = -1,
|
|
|
|
|
TOUCH_STATE_IDLE,
|
|
|
|
|
TOUCH_STATE_HELD,
|
|
|
|
|
TOUCH_STATE_DRAGGING,
|
|
|
|
|
TOUCH_STATE_SCROLLING,
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_surface {
|
|
|
|
|
struct wl_surface *surf;
|
|
|
|
|
struct wp_viewport *viewport;
|
render: gamma-correct blending
This implements gamma-correct blending, which mainly affects font
rendering.
The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols >= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).
How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.
Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.
Emojis: we require fcft >= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.
Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.
There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.
Perhaps, in the future, we can enable it by default if:
* gamma-correct blending is enabled
* the user has not enabled a transparent background
2025-02-21 11:01:29 +01:00
|
|
|
struct wp_color_management_surface_v1 *color_management;
|
2023-06-26 16:10:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct wayl_sub_surface {
|
|
|
|
|
struct wayl_surface surface;
|
|
|
|
|
struct wl_subsurface *sub;
|
|
|
|
|
};
|
|
|
|
|
|
2020-10-28 19:16:04 +01:00
|
|
|
struct wl_window;
|
2019-10-27 16:15:32 +01:00
|
|
|
struct wl_clipboard {
|
2020-10-28 19:16:04 +01:00
|
|
|
struct wl_window *window; /* For DnD */
|
2019-10-27 16:15:32 +01:00
|
|
|
struct wl_data_source *data_source;
|
|
|
|
|
struct wl_data_offer *data_offer;
|
2020-10-28 19:16:04 +01:00
|
|
|
enum data_offer_mime_type mime_type;
|
2019-10-27 16:15:32 +01:00
|
|
|
char *text;
|
|
|
|
|
uint32_t serial;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct wl_primary {
|
|
|
|
|
struct zwp_primary_selection_source_v1 *data_source;
|
|
|
|
|
struct zwp_primary_selection_offer_v1 *data_offer;
|
2020-10-28 19:16:04 +01:00
|
|
|
enum data_offer_mime_type mime_type;
|
2019-10-27 16:15:32 +01:00
|
|
|
char *text;
|
|
|
|
|
uint32_t serial;
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-12 19:05:24 +01:00
|
|
|
/* Maps a mouse button to its "owning" surface */
|
|
|
|
|
struct button_tracker {
|
|
|
|
|
int button;
|
|
|
|
|
int surf_kind; /* TODO: this is really an "enum term_surface" */
|
|
|
|
|
bool send_to_client; /* Only valid when surface is the main grid surface */
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-20 15:01:21 -07:00
|
|
|
struct rect {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
struct seat {
|
|
|
|
|
struct wayland *wayl;
|
|
|
|
|
struct wl_seat *wl_seat;
|
|
|
|
|
uint32_t wl_name;
|
|
|
|
|
char *name;
|
|
|
|
|
|
|
|
|
|
/* Focused terminals */
|
|
|
|
|
struct terminal *kbd_focus;
|
|
|
|
|
struct terminal *mouse_focus;
|
2022-06-15 18:41:08 +02:00
|
|
|
struct terminal *ime_focus;
|
2020-07-08 16:45:26 +02:00
|
|
|
|
|
|
|
|
/* Keyboard state */
|
|
|
|
|
struct wl_keyboard *wl_keyboard;
|
|
|
|
|
struct {
|
2020-07-09 11:20:46 +02:00
|
|
|
uint32_t serial;
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
struct xkb_context *xkb;
|
|
|
|
|
struct xkb_keymap *xkb_keymap;
|
|
|
|
|
struct xkb_state *xkb_state;
|
|
|
|
|
struct xkb_compose_table *xkb_compose_table;
|
|
|
|
|
struct xkb_compose_state *xkb_compose_state;
|
|
|
|
|
struct {
|
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
|
|
bool dont_re_repeat;
|
|
|
|
|
int32_t delay;
|
|
|
|
|
int32_t rate;
|
|
|
|
|
uint32_t key;
|
|
|
|
|
} repeat;
|
|
|
|
|
|
|
|
|
|
xkb_mod_index_t mod_shift;
|
|
|
|
|
xkb_mod_index_t mod_alt;
|
|
|
|
|
xkb_mod_index_t mod_ctrl;
|
2021-11-21 12:01:16 +01:00
|
|
|
xkb_mod_index_t mod_super;
|
2021-11-20 20:31:59 +01:00
|
|
|
xkb_mod_index_t mod_caps;
|
|
|
|
|
xkb_mod_index_t mod_num;
|
2020-07-08 16:45:26 +02:00
|
|
|
|
input/config: support *all* modifier names
That is, allow custom modifiers (i.e. other than ctrl/shift/alt etc)
in key bindings.
This is done by no longer validating/translating modifier names to
booleans for a pre-configured set of modifiers (ctrl, shift, alt,
super).
Instead, we keep the modifier *names* in a list, in the key binding
struct.
When a keymap is loaded, and we "convert" the key binding, _then_ we
do modifier translation. For invalid modifier names, we print an
error, and then ignore it. I.e. we no longer fail to load a config due
to invalid modifier names.
We also need to update how we determine the set of significant
modifiers. Any modifier not in this list will be ignored when matching
key bindings.
Before this patch, we hardcoded this to shift/alt/ctrl/super. Now, to
handle custom modifiers as well, we simply treat *all* modifiers
defined by the current layout as significant.
Typically, the only unwanted modifiers are "locked" modifiers. We are
already filtering these out.
2023-05-06 11:39:38 +02:00
|
|
|
xkb_mod_mask_t legacy_significant; /* Significant modifiers for the legacy keyboard protocol */
|
|
|
|
|
xkb_mod_mask_t kitty_significant; /* Significant modifiers for the kitty keyboard protocol */
|
2021-11-21 11:27:31 +01:00
|
|
|
|
2020-09-15 18:44:54 +02:00
|
|
|
xkb_keycode_t key_arrow_up;
|
|
|
|
|
xkb_keycode_t key_arrow_down;
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
/* Enabled modifiers */
|
|
|
|
|
bool shift;
|
|
|
|
|
bool alt;
|
|
|
|
|
bool ctrl;
|
2021-11-21 12:01:16 +01:00
|
|
|
bool super;
|
2020-07-08 16:45:26 +02:00
|
|
|
} kbd;
|
|
|
|
|
|
|
|
|
|
/* Pointer state */
|
|
|
|
|
struct wl_pointer *wl_pointer;
|
|
|
|
|
struct {
|
|
|
|
|
uint32_t serial;
|
|
|
|
|
|
2023-06-27 17:25:57 +02:00
|
|
|
/* Client-side cursor */
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_surface surface;
|
2020-07-08 16:45:26 +02:00
|
|
|
struct wl_cursor_theme *theme;
|
|
|
|
|
struct wl_cursor *cursor;
|
2023-06-27 17:25:57 +02:00
|
|
|
|
|
|
|
|
/* Server-side cursor */
|
|
|
|
|
struct wp_cursor_shape_device_v1 *shape_device;
|
|
|
|
|
|
2023-06-22 14:23:53 +02:00
|
|
|
float scale;
|
2020-07-31 17:09:06 +02:00
|
|
|
bool hidden;
|
2023-06-27 16:57:33 +02:00
|
|
|
enum cursor_shape shape;
|
2023-06-28 13:25:08 +02:00
|
|
|
char *last_custom_xcursor;
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
struct wl_callback *xcursor_callback;
|
2020-07-09 09:52:11 +02:00
|
|
|
bool xcursor_pending;
|
2020-07-08 16:45:26 +02:00
|
|
|
} pointer;
|
|
|
|
|
|
2023-07-05 00:19:21 +08:00
|
|
|
/* Touch state */
|
|
|
|
|
struct wl_touch *wl_touch;
|
|
|
|
|
struct {
|
|
|
|
|
enum touch_state state;
|
|
|
|
|
|
|
|
|
|
uint32_t serial;
|
|
|
|
|
uint32_t time;
|
|
|
|
|
struct wl_surface *surface;
|
2023-08-19 23:01:53 +08:00
|
|
|
int surface_kind;
|
2023-07-05 00:19:21 +08:00
|
|
|
int32_t id;
|
|
|
|
|
} touch;
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
struct {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int col;
|
|
|
|
|
int row;
|
|
|
|
|
|
2020-12-12 19:05:24 +01:00
|
|
|
/* Mouse buttons currently being pressed, and their "owning" surfaces */
|
|
|
|
|
tll(struct button_tracker) buttons;
|
|
|
|
|
|
|
|
|
|
/* Double- and triple click state */
|
2020-07-08 16:45:26 +02:00
|
|
|
int count;
|
2020-12-12 19:05:24 +01:00
|
|
|
int last_released_button;
|
2022-01-15 14:56:13 +05:30
|
|
|
struct timespec last_time;
|
2020-07-08 16:45:26 +02:00
|
|
|
|
|
|
|
|
/* We used a discrete axis event in the current pointer frame */
|
2021-08-05 18:34:09 +02:00
|
|
|
double aggregated[2];
|
2024-06-15 10:17:01 +02:00
|
|
|
double aggregated_120[2];
|
2020-07-08 16:45:26 +02:00
|
|
|
bool have_discrete;
|
|
|
|
|
} mouse;
|
|
|
|
|
|
|
|
|
|
/* Clipboard */
|
|
|
|
|
struct wl_data_device *data_device;
|
|
|
|
|
struct zwp_primary_selection_device_v1 *primary_selection_device;
|
|
|
|
|
|
|
|
|
|
struct wl_clipboard clipboard;
|
|
|
|
|
struct wl_primary primary;
|
2020-10-10 22:14:35 +02:00
|
|
|
|
2020-12-03 18:36:56 +01:00
|
|
|
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
|
2020-10-10 22:14:35 +02:00
|
|
|
/* Input Method Editor */
|
|
|
|
|
struct zwp_text_input_v3 *wl_text_input;
|
2020-12-01 19:31:49 +01:00
|
|
|
struct {
|
2020-12-20 15:01:21 -07:00
|
|
|
struct {
|
|
|
|
|
struct rect pending;
|
|
|
|
|
struct rect sent;
|
|
|
|
|
} cursor_rect;
|
|
|
|
|
|
2020-12-01 19:31:49 +01:00
|
|
|
struct {
|
2020-12-02 18:52:50 +01:00
|
|
|
struct {
|
|
|
|
|
char *text;
|
|
|
|
|
int32_t cursor_begin;
|
|
|
|
|
int32_t cursor_end;
|
|
|
|
|
} pending;
|
2021-03-23 13:03:07 +01:00
|
|
|
|
fcft: adapt to API changes in fcft-3.x
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.
Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.
For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).
Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.
These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.
For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.
FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.
Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.
Other fcft API changes:
* fcft_glyph_rasterize() -> fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
2021-08-21 14:50:42 +02:00
|
|
|
char32_t *text;
|
2021-03-23 13:03:07 +01:00
|
|
|
struct cell *cells;
|
|
|
|
|
int count;
|
|
|
|
|
struct {
|
|
|
|
|
bool hidden;
|
|
|
|
|
int start; /* Cell index, inclusive */
|
|
|
|
|
int end; /* Cell index, exclusive */
|
|
|
|
|
} cursor;
|
2020-12-01 19:31:49 +01:00
|
|
|
} preedit;
|
|
|
|
|
|
|
|
|
|
struct {
|
2020-12-02 18:52:50 +01:00
|
|
|
struct {
|
|
|
|
|
char *text;
|
|
|
|
|
} pending;
|
2020-12-01 19:31:49 +01:00
|
|
|
} commit;
|
|
|
|
|
|
|
|
|
|
struct {
|
2020-12-02 18:52:50 +01:00
|
|
|
struct {
|
|
|
|
|
uint32_t before_length;
|
|
|
|
|
uint32_t after_length;
|
|
|
|
|
} pending;
|
2020-12-01 19:31:49 +01:00
|
|
|
} surrounding;
|
|
|
|
|
|
|
|
|
|
uint32_t serial;
|
|
|
|
|
} ime;
|
2020-12-03 18:36:56 +01:00
|
|
|
#endif
|
2020-07-08 16:45:26 +02:00
|
|
|
};
|
|
|
|
|
|
2020-02-29 18:02:38 +01:00
|
|
|
enum csd_surface {
|
|
|
|
|
CSD_SURF_TITLE,
|
|
|
|
|
CSD_SURF_LEFT,
|
|
|
|
|
CSD_SURF_RIGHT,
|
|
|
|
|
CSD_SURF_TOP,
|
|
|
|
|
CSD_SURF_BOTTOM,
|
2020-03-02 20:29:28 +01:00
|
|
|
CSD_SURF_MINIMIZE,
|
|
|
|
|
CSD_SURF_MAXIMIZE,
|
|
|
|
|
CSD_SURF_CLOSE,
|
2020-02-29 18:02:38 +01:00
|
|
|
CSD_SURF_COUNT,
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
struct monitor {
|
|
|
|
|
struct wayland *wayl;
|
|
|
|
|
struct wl_output *output;
|
|
|
|
|
struct zxdg_output_v1 *xdg;
|
|
|
|
|
uint32_t wl_name;
|
|
|
|
|
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
|
|
|
|
|
struct {
|
|
|
|
|
/* Physical size, in mm */
|
|
|
|
|
struct {
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
} mm;
|
|
|
|
|
|
|
|
|
|
/* Physical size, in pixels */
|
|
|
|
|
struct {
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
} px_real;
|
|
|
|
|
|
|
|
|
|
/* Scaled size, in pixels */
|
|
|
|
|
struct {
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
} px_scaled;
|
|
|
|
|
} dim;
|
|
|
|
|
|
|
|
|
|
struct {
|
|
|
|
|
/* PPI, based on physical size */
|
|
|
|
|
struct {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
} real;
|
|
|
|
|
|
|
|
|
|
/* PPI, logical, based on scaled size */
|
|
|
|
|
struct {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
} scaled;
|
|
|
|
|
} ppi;
|
|
|
|
|
|
2023-07-17 16:19:14 +02:00
|
|
|
struct {
|
|
|
|
|
float scaled;
|
|
|
|
|
float physical;
|
|
|
|
|
} dpi;
|
2020-07-26 07:41:57 +02:00
|
|
|
|
2020-07-08 16:45:26 +02:00
|
|
|
int scale;
|
|
|
|
|
float refresh;
|
|
|
|
|
enum wl_output_subpixel subpixel;
|
2021-01-11 17:53:27 +01:00
|
|
|
enum wl_output_transform transform;
|
2020-07-08 16:45:26 +02:00
|
|
|
|
|
|
|
|
/* From wl_output */
|
|
|
|
|
char *make;
|
|
|
|
|
char *model;
|
|
|
|
|
|
|
|
|
|
/* From xdg_output */
|
|
|
|
|
char *name;
|
|
|
|
|
char *description;
|
|
|
|
|
|
|
|
|
|
float inch; /* e.g. 24" */
|
2020-11-24 00:00:43 +01:00
|
|
|
|
|
|
|
|
bool use_output_release;
|
2020-07-08 16:45:26 +02:00
|
|
|
};
|
|
|
|
|
|
2021-01-31 11:12:07 +01:00
|
|
|
struct wl_url {
|
|
|
|
|
const struct url *url;
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_sub_surface surf;
|
2021-01-31 11:12:07 +01:00
|
|
|
};
|
|
|
|
|
|
2021-06-22 18:58:38 +02:00
|
|
|
enum csd_mode {CSD_UNKNOWN, CSD_NO, CSD_YES};
|
|
|
|
|
|
url-mode: add support for XDG activation when opening URLs
First, add a ‘token’ argument to spawn(). When non-NULL, spawn() will
set the ‘XDG_ACTIVATION_TOKEN’ environment variable in the forked
process. If DISPLAY is non-NULL, we also set DESKTOP_STARTUP_ID, for
compatibility with X11 applications. Note that failing to set either
of these environment variables are considered non-fatal - i.e. we
ignore failures.
Next, add a helper function, wayl_get_activation_token(), to generate
an XDG activation token, and call a user-provided callback when it’s
‘done (since token generation is asynchronous). This function takes an
optional ‘seat’ and ‘serial’ arguments - when both are non-NULL/zero,
we set the serial on the token. ‘win’ is a required argument, used to
set the surface on the token.
Re-write wayl_win_set_urgent() to use the new helper function.
Finally, rewrite activate_url() to first try to get an activation
token (and spawn the URL launcher in the token callback). If that
fails, or if we don’t have XDG activation support, spawn the URL
launcher immediately (like before this patch).
Closes #1058
2022-05-03 19:37:04 +02:00
|
|
|
typedef void (*activation_token_cb_t)(const char *token, void *data);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This context holds data used both in the token::done callback, and
|
|
|
|
|
* when cleaning up created, by not-yet-done tokens in
|
|
|
|
|
* wayl_win_destroy().
|
|
|
|
|
*/
|
|
|
|
|
struct xdg_activation_token_context {
|
|
|
|
|
struct wl_window *win; /* Need for win->xdg_tokens */
|
|
|
|
|
struct xdg_activation_token_v1 *xdg_token; /* Used to match token in done() */
|
|
|
|
|
activation_token_cb_t cb; /* User provided callback */
|
|
|
|
|
void *cb_data; /* Callback user pointer */
|
|
|
|
|
};
|
|
|
|
|
|
2019-11-01 20:19:53 +01:00
|
|
|
struct wayland;
|
2019-10-27 13:06:39 +01:00
|
|
|
struct wl_window {
|
2020-01-03 13:37:03 +01:00
|
|
|
struct terminal *term;
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_surface surface;
|
2019-10-27 13:06:39 +01:00
|
|
|
struct xdg_surface *xdg_surface;
|
|
|
|
|
struct xdg_toplevel *xdg_toplevel;
|
2023-07-31 16:32:53 +02:00
|
|
|
struct wp_fractional_scale_v1 *fractional_scale;
|
2023-07-31 16:32:28 +02:00
|
|
|
|
url-mode: add support for XDG activation when opening URLs
First, add a ‘token’ argument to spawn(). When non-NULL, spawn() will
set the ‘XDG_ACTIVATION_TOKEN’ environment variable in the forked
process. If DISPLAY is non-NULL, we also set DESKTOP_STARTUP_ID, for
compatibility with X11 applications. Note that failing to set either
of these environment variables are considered non-fatal - i.e. we
ignore failures.
Next, add a helper function, wayl_get_activation_token(), to generate
an XDG activation token, and call a user-provided callback when it’s
‘done (since token generation is asynchronous). This function takes an
optional ‘seat’ and ‘serial’ arguments - when both are non-NULL/zero,
we set the serial on the token. ‘win’ is a required argument, used to
set the surface on the token.
Re-write wayl_win_set_urgent() to use the new helper function.
Finally, rewrite activate_url() to first try to get an activation
token (and spawn the URL launcher in the token callback). If that
fails, or if we don’t have XDG activation support, spawn the URL
launcher immediately (like before this patch).
Closes #1058
2022-05-03 19:37:04 +02:00
|
|
|
tll(struct xdg_activation_token_context *) xdg_tokens;
|
2022-05-11 21:17:52 +02:00
|
|
|
bool urgency_token_is_pending;
|
2023-07-31 16:32:28 +02:00
|
|
|
|
2022-12-29 11:32:21 +01:00
|
|
|
bool unmapped;
|
2023-03-08 10:44:03 +01:00
|
|
|
float scale;
|
2024-01-09 22:51:17 -06:00
|
|
|
int preferred_buffer_scale;
|
2023-03-08 10:44:03 +01:00
|
|
|
|
2019-10-27 13:06:39 +01:00
|
|
|
struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration;
|
|
|
|
|
|
2021-06-22 18:58:38 +02:00
|
|
|
enum csd_mode csd_mode;
|
2020-02-23 14:17:48 +01:00
|
|
|
|
|
|
|
|
struct {
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_sub_surface surface[CSD_SURF_COUNT];
|
2021-07-22 21:23:59 +02:00
|
|
|
struct fcft_font *font;
|
2020-02-29 12:52:55 +01:00
|
|
|
int move_timeout_fd;
|
|
|
|
|
uint32_t serial;
|
2020-02-23 14:17:48 +01:00
|
|
|
} csd;
|
|
|
|
|
|
2022-05-06 20:05:04 +02:00
|
|
|
struct {
|
|
|
|
|
bool maximize:1;
|
|
|
|
|
bool minimize:1;
|
|
|
|
|
} wm_capabilities;
|
|
|
|
|
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_sub_surface search;
|
|
|
|
|
struct wayl_sub_surface scrollback_indicator;
|
|
|
|
|
struct wayl_sub_surface render_timer;
|
|
|
|
|
struct wayl_sub_surface overlay;
|
2020-08-13 18:35:17 +02:00
|
|
|
|
2019-10-27 16:01:03 +01:00
|
|
|
struct wl_callback *frame_callback;
|
|
|
|
|
|
2019-10-27 13:06:39 +01:00
|
|
|
tll(const struct monitor *) on_outputs; /* Outputs we're mapped on */
|
2021-01-31 11:12:07 +01:00
|
|
|
tll(struct wl_url) urls;
|
2020-01-03 13:54:44 +01:00
|
|
|
|
2020-01-03 18:55:13 +01:00
|
|
|
bool is_configured;
|
2020-02-26 12:39:17 +01:00
|
|
|
bool is_fullscreen;
|
2020-02-26 13:23:00 +01:00
|
|
|
bool is_maximized;
|
2021-01-10 15:40:11 +01:00
|
|
|
bool is_resizing;
|
2020-10-20 20:58:03 +02:00
|
|
|
bool is_tiled_top;
|
|
|
|
|
bool is_tiled_bottom;
|
|
|
|
|
bool is_tiled_left;
|
|
|
|
|
bool is_tiled_right;
|
|
|
|
|
bool is_tiled; /* At least one of is_tiled_{top,bottom,left,right} is true */
|
2020-01-03 13:54:44 +01:00
|
|
|
struct {
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
2021-01-11 18:45:12 +01:00
|
|
|
bool is_activated:1;
|
|
|
|
|
bool is_fullscreen:1;
|
|
|
|
|
bool is_maximized:1;
|
|
|
|
|
bool is_resizing:1;
|
|
|
|
|
bool is_tiled_top:1;
|
|
|
|
|
bool is_tiled_bottom:1;
|
|
|
|
|
bool is_tiled_left:1;
|
|
|
|
|
bool is_tiled_right:1;
|
2021-06-22 18:58:38 +02:00
|
|
|
enum csd_mode csd_mode;
|
2020-01-03 13:54:44 +01:00
|
|
|
} configure;
|
2021-01-17 16:12:54 +01:00
|
|
|
|
|
|
|
|
int resize_timeout_fd;
|
2019-10-27 13:06:39 +01:00
|
|
|
};
|
|
|
|
|
|
2019-10-27 17:13:29 +01:00
|
|
|
struct terminal;
|
2019-10-27 13:06:39 +01:00
|
|
|
struct wayland {
|
2019-10-27 19:08:48 +01:00
|
|
|
struct fdm *fdm;
|
key-binding: new API, for handling sets of key bindings
Up until now, our Wayland seats have been tracking key bindings. This
makes sense, since the seat’s keymap determines how the key bindings
are resolved.
However, tying bindings to the seat/keymap alone isn’t enough, since
we also depend on the current configuration (i.e. user settings) when
resolving a key binding.
This means configurations that doesn’t match the wayland object’s
configuration, currently don’t resolve key bindings correctly. This
applies to footclients where the user has overridden key bindings on
the command line (e.g. --override key-bindings.foo=bar).
Thus, to correctly resolve key bindings, each set of key bindings must
be tied *both* to a seat/keymap, *and* a configuration.
This patch introduces a key-binding manager, with an API to
add/remove/lookup, and load/unload keymaps from sets of key bindings.
In the API, sets are tied to a seat and terminal instance, since this
makes the most sense (we need to instantiate, or incref a set whenever
a new terminal instance is created). Internally, the set is tied to a
seat and the terminal’s configuration.
Sets are *added* when a new seat is added, and when a new terminal
instance is created. Since there can only be one instance of each
seat, sets are always removed when a seat is removed.
Terminals on the other hand can re-use the same configuration (and
typically do). Thus, sets ref-count the configuration. In other words,
when instantiating a new terminal, we may not have to instantiate a
new set of key bindings, but can often be incref:ed instead.
Whenever the keymap changes on a seat, all key bindings sets
associated with that seat reloads (re-resolves) their key bindings.
Closes #931
2022-04-17 15:39:51 +02:00
|
|
|
struct key_binding_manager *key_binding_manager;
|
2020-03-15 13:36:35 +01:00
|
|
|
|
|
|
|
|
int fd;
|
|
|
|
|
|
2019-10-27 13:06:39 +01:00
|
|
|
struct wl_display *display;
|
|
|
|
|
struct wl_registry *registry;
|
|
|
|
|
struct wl_compositor *compositor;
|
|
|
|
|
struct wl_subcompositor *sub_compositor;
|
|
|
|
|
struct wl_shm *shm;
|
|
|
|
|
|
|
|
|
|
struct zxdg_output_manager_v1 *xdg_output_manager;
|
|
|
|
|
|
2019-10-27 18:43:07 +01:00
|
|
|
struct xdg_wm_base *shell;
|
|
|
|
|
struct zxdg_decoration_manager_v1 *xdg_decoration_manager;
|
|
|
|
|
|
2019-10-27 13:06:39 +01:00
|
|
|
struct wl_data_device_manager *data_device_manager;
|
|
|
|
|
struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager;
|
2019-10-27 17:07:44 +01:00
|
|
|
|
2021-05-09 12:13:14 +02:00
|
|
|
struct xdg_activation_v1 *xdg_activation;
|
|
|
|
|
|
2023-07-31 16:32:53 +02:00
|
|
|
struct wp_viewporter *viewporter;
|
|
|
|
|
struct wp_fractional_scale_manager_v1 *fractional_scale_manager;
|
|
|
|
|
|
2023-06-27 17:25:57 +02:00
|
|
|
struct wp_cursor_shape_manager_v1 *cursor_shape_manager;
|
|
|
|
|
|
2024-05-21 16:09:34 +02:00
|
|
|
struct wp_single_pixel_buffer_manager_v1 *single_pixel_manager;
|
|
|
|
|
|
2024-09-08 11:18:30 +02:00
|
|
|
struct xdg_toplevel_icon_manager_v1 *toplevel_icon_manager;
|
|
|
|
|
|
2025-01-17 10:10:10 +01:00
|
|
|
struct xdg_system_bell_v1 *system_bell;
|
|
|
|
|
|
render: gamma-correct blending
This implements gamma-correct blending, which mainly affects font
rendering.
The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols >= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).
How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.
Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.
Emojis: we require fcft >= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.
Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.
There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.
Perhaps, in the future, we can enable it by default if:
* gamma-correct blending is enabled
* the user has not enabled a transparent background
2025-02-21 11:01:29 +01:00
|
|
|
struct {
|
|
|
|
|
struct wp_color_manager_v1 *manager;
|
|
|
|
|
struct wp_image_description_v1 *img_description;
|
|
|
|
|
bool have_intent_perceptual;
|
|
|
|
|
bool have_feat_parametric;
|
|
|
|
|
bool have_tf_ext_linear;
|
|
|
|
|
bool have_primaries_srgb;
|
|
|
|
|
} color_management;
|
|
|
|
|
|
2022-04-17 16:29:30 +02:00
|
|
|
bool presentation_timings;
|
2020-07-08 16:45:26 +02:00
|
|
|
struct wp_presentation *presentation;
|
|
|
|
|
uint32_t presentation_clock_id;
|
2024-05-21 16:09:34 +02:00
|
|
|
|
2020-12-03 18:36:56 +01:00
|
|
|
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
|
2020-10-10 22:14:35 +02:00
|
|
|
struct zwp_text_input_manager_v3 *text_input_manager;
|
2020-12-03 18:36:56 +01:00
|
|
|
#endif
|
2020-10-10 22:14:35 +02:00
|
|
|
|
2019-10-27 13:06:39 +01:00
|
|
|
tll(struct monitor) monitors; /* All available outputs */
|
2020-07-08 16:45:26 +02:00
|
|
|
tll(struct seat) seats;
|
2019-10-27 17:13:29 +01:00
|
|
|
|
2019-10-30 20:02:06 +01:00
|
|
|
tll(struct terminal *) terms;
|
2024-07-18 08:07:32 +02:00
|
|
|
|
|
|
|
|
/* WL_SHM >= 2 */
|
|
|
|
|
bool use_shm_release;
|
render: gamma-correct blending
This implements gamma-correct blending, which mainly affects font
rendering.
The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols >= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).
How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.
Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.
Emojis: we require fcft >= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.
Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.
There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.
Perhaps, in the future, we can enable it by default if:
* gamma-correct blending is enabled
* the user has not enabled a transparent background
2025-02-21 11:01:29 +01:00
|
|
|
|
|
|
|
|
bool shm_have_argb2101010:1;
|
|
|
|
|
bool shm_have_xrgb2101010:1;
|
|
|
|
|
bool shm_have_abgr2101010:1;
|
|
|
|
|
bool shm_have_xbgr2101010:1;
|
2019-10-27 13:06:39 +01:00
|
|
|
};
|
2019-10-27 15:57:23 +01:00
|
|
|
|
2022-04-17 16:29:30 +02:00
|
|
|
struct wayland *wayl_init(
|
|
|
|
|
struct fdm *fdm, struct key_binding_manager *key_binding_manager,
|
|
|
|
|
bool presentation_timings);
|
2019-10-27 15:57:23 +01:00
|
|
|
void wayl_destroy(struct wayland *wayl);
|
2019-10-27 16:01:03 +01:00
|
|
|
|
2023-06-22 14:23:53 +02:00
|
|
|
bool wayl_reload_xcursor_theme(struct seat *seat, float new_scale);
|
2021-02-12 11:29:36 +01:00
|
|
|
|
wayland: wl_display_flush() never blocks
Since it doesn't block, we need to detect EAGAIN failures and ensure
we actually flush everything.
If we don't, we sooner or later end up in a wayland client library
call that aborts due to the socket buffer being full.
Ideally, we'd simply enable POLLOUT in the FDM. However, we cannot
write *anything* to the wayland socket until we've actually managed to
send everything. This means enabling POLLOUT in the FDM wont work
since we may (*will*) end up trying to write more data to it before
we've flushed it.
So, add a wrapper function, wayl_flush(), that acts as a blocking
variant of wl_display_flush(), by detecting EAGAIN failiures and
calling poll() itself, on the wayland socket only, until all data has
been sent.
2020-01-04 21:10:08 +01:00
|
|
|
void wayl_flush(struct wayland *wayl);
|
2020-01-03 21:02:12 +01:00
|
|
|
void wayl_roundtrip(struct wayland *wayl);
|
|
|
|
|
|
2023-06-26 15:51:04 +02:00
|
|
|
bool wayl_fractional_scaling(const struct wayland *wayl);
|
|
|
|
|
void wayl_surface_scale(
|
2023-06-26 21:06:47 +02:00
|
|
|
const struct wl_window *win, const struct wayl_surface *surf,
|
2023-06-26 17:05:16 +02:00
|
|
|
const struct buffer *buf, float scale);
|
|
|
|
|
void wayl_surface_scale_explicit_width_height(
|
2023-06-26 21:06:47 +02:00
|
|
|
const struct wl_window *win, const struct wayl_surface *surf,
|
2023-06-26 17:05:16 +02:00
|
|
|
int width, int height, float scale);
|
2023-06-26 15:51:04 +02:00
|
|
|
|
2021-10-28 17:51:44 -07:00
|
|
|
struct wl_window *wayl_win_init(struct terminal *term, const char *token);
|
2019-10-27 16:01:03 +01:00
|
|
|
void wayl_win_destroy(struct wl_window *win);
|
2020-07-08 19:52:17 +02:00
|
|
|
|
2023-06-26 17:05:16 +02:00
|
|
|
void wayl_win_scale(struct wl_window *win, const struct buffer *buf);
|
osc: update font subpixel mode, and window opaque compositor hint, on alpha changes
When background alpha is changed at runtime (using OSC-11), we (may)
have to update the opaque hint we send to the compositor.
We must also update the subpixel mode used when rendering font
glyphs.
Why?
When the window is fully opaque, we use wl_surface_set_opaque_region()
on the entire surface, to hint to the compositor that it doesn’t have
to blend the window content with whatever is behind the
window. Obviously, if alpha is changed from opaque, to transparent (or
semi-transparent), that hint must be removed.
Sub-pixel mode is harder to explain, but in short, we can’t do
subpixel hinting with a (semi-)transparent background. Thus, similar
to the opaque hint, subpixel antialiasing must be enabled/disabled
when background alpha is changed.
2023-05-25 18:39:32 +02:00
|
|
|
void wayl_win_alpha_changed(struct wl_window *win);
|
2021-05-09 12:13:14 +02:00
|
|
|
bool wayl_win_set_urgent(struct wl_window *win);
|
2025-01-17 10:10:10 +01:00
|
|
|
bool wayl_win_ring_bell(const struct wl_window *win);
|
2021-05-09 12:13:14 +02:00
|
|
|
|
2022-04-16 11:26:28 +02:00
|
|
|
bool wayl_win_csd_titlebar_visible(const struct wl_window *win);
|
|
|
|
|
bool wayl_win_csd_borders_visible(const struct wl_window *win);
|
|
|
|
|
|
2021-02-12 11:29:36 +01:00
|
|
|
bool wayl_win_subsurface_new(
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wl_window *win, struct wayl_sub_surface *surf,
|
2022-04-16 17:41:14 +02:00
|
|
|
bool allow_pointer_input);
|
2021-02-12 11:29:36 +01:00
|
|
|
bool wayl_win_subsurface_new_with_custom_parent(
|
|
|
|
|
struct wl_window *win, struct wl_surface *parent,
|
2023-06-26 16:10:40 +02:00
|
|
|
struct wayl_sub_surface *surf, bool allow_pointer_input);
|
|
|
|
|
void wayl_win_subsurface_destroy(struct wayl_sub_surface *surf);
|
url-mode: add support for XDG activation when opening URLs
First, add a ‘token’ argument to spawn(). When non-NULL, spawn() will
set the ‘XDG_ACTIVATION_TOKEN’ environment variable in the forked
process. If DISPLAY is non-NULL, we also set DESKTOP_STARTUP_ID, for
compatibility with X11 applications. Note that failing to set either
of these environment variables are considered non-fatal - i.e. we
ignore failures.
Next, add a helper function, wayl_get_activation_token(), to generate
an XDG activation token, and call a user-provided callback when it’s
‘done (since token generation is asynchronous). This function takes an
optional ‘seat’ and ‘serial’ arguments - when both are non-NULL/zero,
we set the serial on the token. ‘win’ is a required argument, used to
set the surface on the token.
Re-write wayl_win_set_urgent() to use the new helper function.
Finally, rewrite activate_url() to first try to get an activation
token (and spawn the URL launcher in the token callback). If that
fails, or if we don’t have XDG activation support, spawn the URL
launcher immediately (like before this patch).
Closes #1058
2022-05-03 19:37:04 +02:00
|
|
|
|
|
|
|
|
bool wayl_get_activation_token(
|
|
|
|
|
struct wayland *wayl, struct seat *seat, uint32_t serial,
|
|
|
|
|
struct wl_window *win, activation_token_cb_t cb, void *cb_data);
|
2024-07-23 06:58:37 +02:00
|
|
|
void wayl_activate(struct wayland *wayl, struct wl_window *win, const char *token);
|
|
|
|
|
|