Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11: Fix infinite loops caused by propagated Expose events #1725

Merged
merged 1 commit into from Feb 19, 2024

Conversation

Suyooo
Copy link
Contributor

@Suyooo Suyooo commented Feb 17, 2024

Checklist

  • I have described the changes
  • I have linked to any relevant GitHub issues, if applicable
  • [not needed] Documentation in doc/ has been updated
  • All new code is licensed under GPLv3

Description

Fixes two issues introduced with the X11 Expose event propagation in commit a4ac632, as described in issue #1698:

  • Propagating the event causes an infinite loop in some window managers (at least herbstluftwm and enlightenment) caused by the event being returned to the conky window after propagation.
  • Propagating the event causes an infinite loop if own_window is off caused by conky propagating the event to itself.

I couldn't find any documentation saying Expose events should be propagated, so this fix simply stops propagation of the Expose event, just like it was handled by conky before the commit. There wasn't a specific issue that was fixed by this change in the original PR (propagation was added for input events, Expose events were being propagated alongside them), so I believe this will not introduce a regression.

I've tested this in both xfce and herbstluftwm, and both with picom running as compositor with own_window yes, and no compositor running with own_window no. No infinite loop occurs in any of these cases, and conky is drawn as expected.

@github-actions github-actions bot added the sources PR modifies project sources label Feb 17, 2024
Copy link

netlify bot commented Feb 17, 2024

Deploy Preview for conkyweb ready!

Name Link
🔨 Latest commit f18bed7
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/65d126282e89060008010157
😎 Deploy Preview https://deploy-preview-1725--conkyweb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Suyooo Suyooo changed the title X11: Fix infinite loop from Expose events being returned X11: Fix infinite loops caused by propagated Expose events Feb 17, 2024
@brndnmtthws brndnmtthws merged commit aa6e61b into brndnmtthws:main Feb 19, 2024
53 checks passed
@brndnmtthws brndnmtthws added the bug Bug report or bug fix PR label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants