[xmonad] Fix invisible borders

Igor Babuschkin ibabuschkin at gmail.com
Mon Jan 5 08:18:16 UTC 2015


You're absolutely right about .|. (Didn't bother to change it back
then, as I knew that only the color bits would be set)
The patch now looks like this:

--- XMonad/Main.hsc 2013-01-01 02:31:47.000000000 +0100
+++ ../xmonad-0.11-fixed/XMonad/Main.hsc 2015-01-05 09:03:50.659161937 +0100
@@ -116,8 +116,8 @@
             { display       = dpy
             , config        = xmc
             , theRoot       = rootw
-            , normalBorder  = nbc
-            , focusedBorder = fbc
+            , normalBorder  = nbc .|. 0xFF000000 -- fix invisible borders
+            , focusedBorder = fbc .|. 0xFF000000 --
             , keyActions    = keys xmc xmc
             , buttonActions = mouseBindings xmc xmc
             , mouseFocused  = False

At first I was also worried that this might cause crashes, but haven't
noticed anything in several months of daily use.

Igor


On Mon Jan 05 2015 at 12:52:19 AM Brandon Allbery <allbery.b at gmail.com> wrote:

I should note that (a) this may not be completely safe for ordinary
windows, and (b) it still won't help programs that use DirectColor
visuals; both which might cause xmonad to throw an exception.
>
>
> On Sun, Jan 4, 2015 at 6:49 PM, Michael Sloan <mgsloan at gmail.com> wrote:
>>
>> Cool, seems like a good thing to fix! (Personally I don't use borders, though)
>>
>> While this is fine if you can guarantee (nbc < 0x01000000 && fbc <
>> 0x01000000), it may be worthwhile to use (.|.) from Data.Bits instead
>> of (+) to ensure that the colors don't overflow.
>>
>> -Michael
>>
>> On Sat, Jan 3, 2015 at 3:58 PM, Igor Babuschkin <ibabuschkin at gmail.com> wrote:
>> > Hi,
>> >
>> > I just browsed through the mailing list and noticed that some people
>> > were having problems with borders disappearing when viewing RGBA
>> > windows. This happened to me with Nautilus, Evince, Chrome and others.
>> >
>> > I've written a tiny fix for this more than 6 months ago, but never
>> > contributed it. (Didn't manage to install darcs. Just tried again for an
>> > hour and failed again)
>> >
>> > Thought I should post this in case someone is still suffering from it.
>> > The patch flips the transparency bits in addition to the color bits specified by the user.
>> > (They are 0x00 otherwise and result in full transparency)
>> >
>> > --- XMonad/Main.hsc     2013-01-01 02:31:47.000000000 +0100
>> > +++ ../xmonad-0.11-fixed/XMonad/Main.hsc        2014-06-15 13:25:20.766852974 +0200
>> > @@ -116,8 +116,8 @@
>> >              { display       = dpy
>> >              , config        = xmc
>> >              , theRoot       = rootw
>> > -            , normalBorder  = nbc
>> > -            , focusedBorder = fbc
>> > +            , normalBorder  = nbc + 0xFF000000 -- fix invisible borders
>> > +            , focusedBorder = fbc + 0xFF000000 --
>> >              , keyActions    = keys xmc xmc
>> >              , buttonActions = mouseBindings xmc xmc
>> >              , mouseFocused  = False
>> >
>> > Cheers,
>> > Igor
>> >
>> >
>> > _______________________________________________
>> > xmonad mailing list
>> > xmonad at haskell.org
>> > http://www.haskell.org/mailman/listinfo/xmonad
>> _______________________________________________
>> xmonad mailing list
>> xmonad at haskell.org
>> http://www.haskell.org/mailman/listinfo/xmonad
>
>
>
>
> --
> brandon s allbery kf8nh                               sine nomine associates
> allbery.b at gmail.com                                  ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net


More information about the xmonad mailing list