~emersion/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH kanshi] Re-evaluate profiles upon monitor unplug event.

Darrel Griët <dgriet@gmail.com>
Details
Message ID
<20230423132906.75334-1-dgriet@gmail.com>
DKIM signature
missing
Download raw message
Patch: +3 -0
The output_manager_handle_head() function is only called when a new head is introduced.
This will add a new head to the link structure and try to apply a matching profile.
Whenever a head disapears the head_handle_finished() function is called.
The link structure is updated accordingly but a new profile isn't applied if needed.

This adds this functionallity it may fix https://todo.sr.ht/~emersion/kanshi/61 but this has not been tested with i3. Instead this was tested with Hyprland.

Signed-off-by: Darrel Griët <dgriet@gmail.com>
---
 main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main.c b/main.c
index 202b780..ece21c5 100644
--- a/main.c
+++ b/main.c
@@ -426,6 +426,7 @@ static void head_handle_scale(void *data,
static void head_handle_finished(void *data,
		struct zwlr_output_head_v1 *wlr_head) {
	struct kanshi_head *head = data;
	struct kanshi_state *state = head->state;
	wl_list_remove(&head->link);
	if (zwlr_output_head_v1_get_version(head->wlr_head) >= 3) {
		zwlr_output_head_v1_release(head->wlr_head);
@@ -438,6 +439,8 @@ static void head_handle_finished(void *data,
	free(head->model);
	free(head->serial_number);
	free(head);

	try_apply_profiles(state);
}

void head_handle_make(void *data,
-- 
2.40.0

[kanshi/patches/.build.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CS466YYX3J63.4M8HDFRDRHCX@cirno2>
In-Reply-To
<20230423132906.75334-1-dgriet@gmail.com> (view parent)
DKIM signature
missing
Download raw message
kanshi/patches/.build.yml: FAILED in 21s

[Re-evaluate profiles upon monitor unplug event.][0] from [Darrel Griët][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/40604
[1]: dgriet@gmail.com

✗ #978303 FAILED kanshi/patches/.build.yml https://builds.sr.ht/~emersion/job/978303
Details
Message ID
<-jWlsPDpx-MzPYI0nyjNWzZrTHNGZGTkfksBUq-v1JsvjFNJla0VTTtx6vIABElkD88I5uDeYyaJ2AKAXqElnjrSfaWpfZz8qgz0SbUICcE=@emersion.fr>
In-Reply-To
<20230423132906.75334-1-dgriet@gmail.com> (view parent)
DKIM signature
missing
Download raw message
The compositor is supposed to send a zwlr_output_manager_v1.done event
after any configuration change. IOW, a done event should be sent after
the finished event.

The done event allows the client to handle all of the individual events
in an atomic fashion.
Reply to thread Export thread (mbox)