Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

fix flickering v3 #363

Closed
wants to merge 5 commits into from
Closed

fix flickering v3 #363

wants to merge 5 commits into from

Conversation

sevz17
Copy link
Collaborator

@sevz17 sevz17 commented Dec 16, 2022

This mitigate the issue mentioned here and also is shorter than #357

@sevz17 sevz17 mentioned this pull request Dec 16, 2022
@BenJarg
Copy link
Contributor

BenJarg commented Dec 18, 2022

I'm still seeing an issue like the one you mentioned in #357. For example, starting a client, putting it in another tag by itself, then run kill -STOP PID on the process, when I try to switch to the tag with the stopped window, dwl doesn't update until switching to a different tag.

@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 20, 2022

I'm still seeing an issue like the one you mentioned in #357. For example, starting a client, putting it in another tag by itself, then run kill -STOP PID on the process, when I try to switch to the tag with the stopped window, dwl doesn't update until switching to a different tag.

Yep, that's why I said "mitigate", there is no easy way to do not skip frames if the client is stopped.
EDIT: turns out that SIGCHLD is raised not only when a child is terminated but also stopped and continued

@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 20, 2022

I think I won't merge this or #357 for 0.4

@sevz17 sevz17 force-pushed the flick-v3 branch 2 times, most recently from 745d006 to d6aee95 Compare December 21, 2022 06:12
@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 21, 2022

@BenJarg, @Job79, @maxagabb, can you try this?, I was able to deal with stopped clients.

@maxagabb
Copy link

On this PR I was able to replicate the stopped client issue (dwl not updating) with BenJarg's steps using kill -STOP PID

On main branch the behavior is different. dwl updates but the stopped client is not sized correctly;
1671642056923

@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 21, 2022

On this PR I was able to replicate the stopped client issue (dwl not updating) with BenJarg's steps using kill -STOP PID

Very odd, FWIW it works fine to me. after more testing, I discovered many bugs :)

On main branch the behavior is different. dwl updates but the stopped client is not sized correctly

That's the expected (and only possible) behavior, the client can do nothing.

@maxagabb
Copy link

Yup could be an issue with how I'm testing. I tried removing all files in .gitignore and compiling again.

I use an alacritty window to send STOP to foot after sending foot to another tag.

Issue does not happen if I go the foot tag once before sending STOP from alacritty.

@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 21, 2022

Yup could be an issue with how I'm testing. I tried removing all files in .gitignore and compiling again.

I use an alacritty window to send STOP to foot after sending foot to another tag.

Issue does not happen if I go the foot tag once before sending STOP from alacritty.

It should be fixed now.

@maxagabb
Copy link

Cool I confirmed this fixes the issue for me.

I noticed there's flicker with foot terminals only when spawning them with bemenu (spawning and resizing).

When launched with keyboard shortcut they only flicker when spawned (no flicker on resize).

@Job79
Copy link
Contributor

Job79 commented Dec 21, 2022

Am testing this patch on my local dwl, seems to work fine so far. Never experienced issues with clients freezing when stopped, does this issue only occur when using kill -STOP {pid}?

edit:
There seems to be some flickering when spawning applications using bemenu. No problem when starting them using shortcuts.

@maxagabb
Copy link

Am testing this patch on my local dwl, seems to work fine so far. Never experienced issues with clients freezing when stopped, does this issue only occur when using kill -STOP {pid}?

Yep I believe that issue only came from kill -STOP {pid}, no freezes otherwise

@sevz17
Copy link
Collaborator Author

sevz17 commented Dec 21, 2022

Yep, for processes where dwl is not their parent (bemenu makes double fork, which means that the created process is child of init) we assume that they are stopped (because we can't get their info), otherwise we could end up with a frozen display.

@maxagabb
Copy link

maxagabb commented Dec 21, 2022

I'm getting no flicker from alacritty windows now using the shortcut.

The desktop background appears briefly when spawning them, but there's no flicker on second monitor (which happened before this PR).

I'm seeing no flickering at all when resizing.

@BenJarg
Copy link
Contributor

BenJarg commented Dec 23, 2022

@sevz17 The stopped client issue looks resolved for me as well.

@sevz17 sevz17 mentioned this pull request Dec 24, 2022
@sevz17 sevz17 closed this Dec 24, 2022
@sevz17 sevz17 deleted the flick-v3 branch December 24, 2022 23:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants