Removing newlines in rc.xml and menu.xml caused parser error with
following content:
<!--
-
- Some comments
-
-->
...though it is a valid XML.
Let's not do that. I moved `grab_file()` to `buf.c` and renamed it to
`buf_from_file()`, because it now directly touches `struct buf` and
I don't like having a source file only for one function.
The new `--keyboard-focus [none|on-demand|exclusive]` option (default:
`none`) allows to some keyboard controls in labnag:
Right-arrow or Tab: move the button selection to the right
Left-arrow or Shift-Tab: move the button selection to the left
Enter: press the selected button
Escape: close labnag
The selected button is highlighted with the inner 1px border. Maybe we can
instead use different colors for the selected button, but I prefer the
inner border for now because it doesn't require us to add new color
options or make them inherit labwc's theme.
The if-statement doesn't make sense, because `view_get_string_prop()`
never returns NULL. And if it did, it would cause segfault in
`osd_thumbnail_update()`.
This commit adds new theme options:
- osd.window-switcher.style-classic.item.active.border.color
- osd.window-switcher.style-classic.item.active.bg.color
These theme options configures the border/background of selected window
item in the `classic` style window switcher. Their default values are
identical to `thumbnail` style window switcher, which means the default
border color is now `osd.label.text.color` with 50% opacity and the
default background color is now `osd.label.text.color` with 15% opacity.
In 2ac4811, I was missing that windows can be tiled to "center".
As a result, after executing
`<action name="SnapToEdge" combined="yes" direction="left" />` against a
center-tiled window, `view->tiled` is set to `CENTER|LEFT`.
Previously, the default values of
`osd.window-switcher.style-thumbnail.item.active.{bg,border}.color`
were blue. But they caused the selected window title in the window
switcher to be unreadable due to duplicated colors of the text and
background with Openbox themes like Numix.
Instead, this commit updates them to follow other themes configurations.
The default border color of the selected window item is now
`osd.label.text.color` with 50% opacity and the background is
`osd.label.text.color` with 15% opacity.
For subpixel antialiasing to work, the background color is calculated by
manually blending `osd.label.text.color` and `osd.bg.color`, rather than
just updating the alpha with 50% or 15%.