From 62b0b65d4712abd9ecd21ec2fe684c87a868bcc1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Aug 2024 14:33:26 +0200 Subject: changelog: add new 'unreleased' section --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a1549a5d..ef655a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#unreleased) * [1.18.0](#1-18-0) * [1.17.2](#1-17-2) * [1.17.1](#1-17-1) @@ -52,6 +53,16 @@ * [1.2.0](#1-2-0) +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.18.0 ### Added -- cgit v1.3 From fb74a2df2766f9f43f6ed6b5020aab25925c671b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 4 Aug 2024 15:23:33 +0200 Subject: changelog: osc-99: sound support --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index ef655a22..258940d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,14 @@ ## Unreleased ### Added + +* OSC-99: support for the `s` parameter. Supported keywords are + `silent`, `system` and names from the freedesktop sound naming + specification. +* `${muted}` and `${sound-name}` added to the + `desktop-notifications.command` template. + + ### Changed ### Deprecated ### Removed -- cgit v1.3 From 7ec9ca2b9528126bf11dda37cfea9687b6bc66a3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Aug 2024 17:12:12 +0200 Subject: input: CSD buttons are now triggered when releasing the mouse button This is how most UIs work. Note that we (at least on River) don't get any surface enter/leave events while a button is held. This means we can't detect if the user pressed the mouse button while on a CSD button, but then moves the mouse outside. Releasing the mouse button will still activate the CSD button. Closes #1787 --- CHANGELOG.md | 5 +++++ input.c | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 258940d4..6d7d6614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,11 @@ ### Changed + +* CSD buttons now activate on mouse button **release**, rather than + press ([#1787][1787]). + + ### Deprecated ### Removed ### Fixed diff --git a/input.c b/input.c index 98f5c89c..4aa410c4 100644 --- a/input.c +++ b/input.c @@ -2577,12 +2577,19 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, } case TERM_SURF_BUTTON_MINIMIZE: - if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) + if (button == BTN_LEFT && + term->active_surface == TERM_SURF_BUTTON_MINIMIZE && + state == WL_POINTER_BUTTON_STATE_RELEASED) + { xdg_toplevel_set_minimized(term->window->xdg_toplevel); + } break; case TERM_SURF_BUTTON_MAXIMIZE: - if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) { + if (button == BTN_LEFT && + term->active_surface == TERM_SURF_BUTTON_MAXIMIZE && + state == WL_POINTER_BUTTON_STATE_RELEASED) + { if (term->window->is_maximized) xdg_toplevel_unset_maximized(term->window->xdg_toplevel); else @@ -2591,8 +2598,12 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, break; case TERM_SURF_BUTTON_CLOSE: - if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) + if (button == BTN_LEFT && + term->active_surface == TERM_SURF_BUTTON_CLOSE && + state == WL_POINTER_BUTTON_STATE_RELEASED) + { term_shutdown(term); + } break; case TERM_SURF_GRID: { -- cgit v1.3 From 2896c1898127256193d49c80a56ba7188fad0e33 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 14 Aug 2024 08:50:44 +0200 Subject: osc: regression: fix OSC-111 handling of alpha changes When the background alpha changes from fully opaque, to transparent, or vice versa, we need to do more than just repaint the affected cells. For example, we need to create new surfaces with the correct pixel format. OSC-11 (set background color) already does this, but the same alpha checking logic was missing in OSC-111 (reset background color). Fixes #1801 --- CHANGELOG.md | 7 +++++++ osc.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d7d6614..fe82d2ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,13 @@ ### Deprecated ### Removed ### Fixed + +* Regression: OSC-111 not handling alpha changes correctly, causing + visual glitches ([#1801][1801]). + +[1801]: https://codeberg.org/dnkl/foot/issues/1801 + + ### Security ### Contributors diff --git a/osc.c b/osc.c index 53597d0f..3c5f7616 100644 --- a/osc.c +++ b/osc.c @@ -1381,13 +1381,22 @@ osc_dispatch(struct terminal *term) term_damage_color(term, COLOR_DEFAULT, 0); break; - case 111: /* Reset default text background color */ + case 111: { /* Reset default text background color */ LOG_DBG("resetting background color"); + bool alpha_changed = term->colors.alpha != term->conf->colors.alpha; + term->colors.bg = term->conf->colors.bg; term->colors.alpha = term->conf->colors.alpha; + + if (alpha_changed) { + wayl_win_alpha_changed(term->window); + term_font_subpixel_changed(term); + } + term_damage_color(term, COLOR_DEFAULT, 0); term_damage_margins(term); break; + } case 112: LOG_DBG("resetting cursor color"); -- cgit v1.3