Fetch border color from the window's colormap #59

merged 2 commits into from Dec 14, 2016


None yet

4 participants

pjones commented Nov 28, 2016

This is a (slightly refactored) patch from Adam Sjøgren (@asjo) which improves upon and completes xmonad/xmonad#9.

There are two important things going on in this PR:

  1. The X11 library was recently updated to correctly throw an exception when getWindowAttributes fails. This PR updates most of the core xmonad calls into getWindowAttributes to avoid crashing when an exception is thrown.

  2. When a window is a true RGBA window, and a compositor is running, xmonad will incorrectly draw semi-transparent window borders on that window. This PR updates xmonad to fetch the border colors from the window's colormap (if there is one) in order to correctly set the border color.

pjones commented Dec 1, 2016

@geekosaur Do you have any objections to this PR?

pjones commented Dec 7, 2016

@dmwit @byorgey Any objections to this PR?

dmwit commented Dec 8, 2016

Nothing jumps out at me as weird or obviously dangerous.

pjones commented Dec 8, 2016

@geekosaur I agree. This needs some good testing.

I don't think we can expect a 0.13 release this month. There are a lot of PRs and issues to go through first. That at least buys us some testing time too.

Here is my game plan:

  1. Release the X11 package. This branch needs an unreleased version of X11 so we need to start there.

  2. Wait a day or two for the X11 release to propagate and then merge this PR into master.

  3. Encourage everyone to start using master as their daily driver until the release.

@pjones pjones added this to the v0.13 milestone Dec 8, 2016
@pjones pjones added the enhancement label Dec 8, 2016
@pjones pjones self-assigned this Dec 8, 2016
asjo commented Dec 8, 2016

For what it's worth I have been running this on my laptop for the past 13 days without problem; I have tried crashing it with Gimp, without being able to. And borders (on Sakura windows) look correct. Just one test data point.

pjones added some commits Nov 23, 2016
@pjones pjones Refactor xmonad/xmonad#9 and remove explicit exception handling 202e239
@pjones pjones Guard most calls to getWindowAttributes since it may throw an exception
This is a continuation of the work done by Adam Sjøgren (@asjo) to
resolve an issue where RGBA windows have transparent borders.  It also
fixes bugs related to windows suddenly disappearing right before
xmonad calls getWindowAttributes.

For more information see xmonad/xmonad#9
@pjones pjones merged commit 7e9c9cc into master Dec 14, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@pjones pjones deleted the feature/fix-PR9 branch Dec 14, 2016
@asjo asjo referenced this pull request in xmonad/xmonad-contrib Jan 20, 2017

Layouts with window navigation using incorrect color map for borders. #138

1 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment