mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-28 07:58:00 -04:00
commit
c9da1dc152
5 changed files with 15 additions and 3 deletions
|
|
@ -42,7 +42,7 @@
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
* OSC-22 - set xcursor pointer.
|
* OSC-22 - set xcursor pointer.
|
||||||
|
* Add "xterm" as fallback cursor where "text" is not available.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,12 @@ void render_refresh(struct terminal *term) {}
|
||||||
void render_refresh_csd(struct terminal *term) {}
|
void render_refresh_csd(struct terminal *term) {}
|
||||||
void render_refresh_title(struct terminal *term) {}
|
void render_refresh_title(struct terminal *term) {}
|
||||||
|
|
||||||
|
bool
|
||||||
|
render_xcursor_is_valid(const struct seat *seat, const char *cursor)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
render_xcursor_set(struct seat *seat, struct terminal *term, const char *xcursor)
|
render_xcursor_set(struct seat *seat, struct terminal *term, const char *xcursor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
8
render.c
8
render.c
|
|
@ -4017,8 +4017,12 @@ render_xcursor_set(struct seat *seat, struct terminal *term, const char *xcursor
|
||||||
seat->pointer.theme, xcursor);
|
seat->pointer.theme, xcursor);
|
||||||
|
|
||||||
if (seat->pointer.cursor == NULL) {
|
if (seat->pointer.cursor == NULL) {
|
||||||
LOG_ERR("failed to load xcursor pointer '%s'", xcursor);
|
seat->pointer.cursor = wl_cursor_theme_get_cursor(
|
||||||
return false;
|
seat->pointer.theme, XCURSOR_TEXT_FALLBACK );
|
||||||
|
if (seat->pointer.cursor == NULL) {
|
||||||
|
LOG_ERR("failed to load xcursor pointer '%s', and fallback '%s'", xcursor, XCURSOR_TEXT_FALLBACK);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
seat->pointer.cursor = NULL;
|
seat->pointer.cursor = NULL;
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
const char *const XCURSOR_HIDDEN = "hidden";
|
const char *const XCURSOR_HIDDEN = "hidden";
|
||||||
const char *const XCURSOR_LEFT_PTR = "left_ptr";
|
const char *const XCURSOR_LEFT_PTR = "left_ptr";
|
||||||
const char *const XCURSOR_TEXT = "text";
|
const char *const XCURSOR_TEXT = "text";
|
||||||
|
const char *const XCURSOR_TEXT_FALLBACK = "xterm";
|
||||||
//const char *const XCURSOR_HAND2 = "hand2";
|
//const char *const XCURSOR_HAND2 = "hand2";
|
||||||
const char *const XCURSOR_TOP_LEFT_CORNER = "top_left_corner";
|
const char *const XCURSOR_TOP_LEFT_CORNER = "top_left_corner";
|
||||||
const char *const XCURSOR_TOP_RIGHT_CORNER = "top_right_corner";
|
const char *const XCURSOR_TOP_RIGHT_CORNER = "top_right_corner";
|
||||||
|
|
|
||||||
|
|
@ -664,6 +664,7 @@ struct terminal {
|
||||||
extern const char *const XCURSOR_HIDDEN;
|
extern const char *const XCURSOR_HIDDEN;
|
||||||
extern const char *const XCURSOR_LEFT_PTR;
|
extern const char *const XCURSOR_LEFT_PTR;
|
||||||
extern const char *const XCURSOR_TEXT;
|
extern const char *const XCURSOR_TEXT;
|
||||||
|
extern const char *const XCURSOR_TEXT_FALLBACK;
|
||||||
//extern const char *const XCURSOR_HAND2;
|
//extern const char *const XCURSOR_HAND2;
|
||||||
extern const char *const XCURSOR_TOP_LEFT_CORNER;
|
extern const char *const XCURSOR_TOP_LEFT_CORNER;
|
||||||
extern const char *const XCURSOR_TOP_RIGHT_CORNER;
|
extern const char *const XCURSOR_TOP_RIGHT_CORNER;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue