This commit removes an unnecessary fallback to the first output's name as
this name ("first") will only be used to see whether "tray_output none"
has been specified, anyway.
We also add documentation that clearly states when we want to initialize
the tray and when we don't want to do the same.
relates to #2220
This commit removes the code for falling back to the first available
output for the system tray if 'tray_output primary' has been specified
but there is no primary output (managed by this bar).
This fallback behavior was broken/unreachable because the tray
will never be initialized in this situation in the first place. Having
this dead code lead to a wrong assumption in #1855 and hence to
commit e2e7b70d00, which makes the
system tray not show up for many users when first installing i3.
Thanks to @rtlanceroad for reporting this issue.
fixes#2220
This allows "modifier none" (and "modifier off") for the bar config
in order to disable the modifier key altogether. This is useful
for users who use a different approach to hiding / showing the bar,
e.g., a custom keybind that involved multiple keys or scripts.
fixes#2208
This disables the default leak-check-on-exit behavior which reports a
bunch of leaks that are only leaks while exiting, at which point they
don’t matter, because the operating system will clean up the memory our
process used.
This patch moves the title_format information from windows to containers.
Furthermore, it allows correctly setting it on window-less containers and
displays the title accordingly for split containers.
We now also dump and read title_format in GET_TREE / during restarts.
fixes#2120
Even if the X11 root window cursor is not set up correctly for some
reason, with this fix, users should at least see the correct cursor when
the pointer is over i3bar.
see issue #2114
This patch migrates all decoration rendering of i3 to cairo. Using the
compile switch CAIRO_SUPPORT, rendering can be switched back to the
previous XCB behavior, just like with the previous migration to cairo
in i3bar.
This patch also fixes a bug in draw_util.c where copying one surface
to another would use incorrect coordinates if the source coordinates
are not 0, 0.
Furthermore, this patch implicitly fixes some minor issues in the
decoration rendering which would be ignored previously due to the fact
that errors would only show up in the event queue, but not cause the
rendering code path to crash. One example is zero-height pixmaps which
are not allowed. Using cairo, these would cause i3 to instantly segfault,
so this patch avoids this.
Lastly, this patch annotates other issues found but not fixed in this patch
using TODO comments, e.g., the zero-height check not working correctly
and the comment that it should probably work the same way for zero-width
pixmaps.
relates to #1278
In order to prepare for using cairo for rendering i3 decorations,
we need to make the draw_util.c from i3bar available via libi3 such
that both i3bar and i3 can use it.
relates to #1278
This patch introduces the possibility to specify the tray_output directive
multiple times. All values will be used by i3bar, in the order they are
given.
This way, a single bar configuration can be used for several machines with
internal output names "eDP1" and "LVDS-0" by specifying tray_output for both.
Any external output (e.g., "DP-0") will still not receive the tray. The same
effect can be achieved by using "primary", but forces the user to couple the
tray display to the primary output which may not be desirable behavior.
relates to #555
This patch adds two new status block keys, background and border, which
define the respective colors for the status block. If not specified, the
current behavior is kept, e.g., no background / border will be drawn.
If the status block is marked urgent, the urgent color is prioritized.
fixes#2022
This commit restores the old XCB drawing code paths while keeping the
cairo drawing available via a compile-time switch (I3BAR_CAIRO). This
is necessary as cairo currently has a bug that breaks i3bar for users
without the RENDER extension, which might be the case, e.g., for VNC
users.
For more context, see #1989 and the discussions about its fix. Once the
cairo fix is available in a stable release, i3 can depend on that version
and remove the XCB drawing code paths.
fixes#1989
This commit refactors the i3bar drawing code to also define an abstraction
function for clearing a surface. This is needed to fully abstract i3bar/xcb.c's
drawing code so that we can introduce a switch to easily exchange the
underlying drawing mechanism.
This introduces the flag "--pango" on the mode config directive to
explicitly enable pango markup for mode names. Not setting this will
cause the mode name to be rendered as is.
This fixes a regression in 4.11 where mode names containing characters
such as '<' would break user's configs as they didn't escape these
characters.
fixes#1992
Since libi3 currently creates its own cairo surface for drawing text, we
need to mark our own surface as dirty to force cairo to invalidate its
cache. Otherwise, this will result in graphical glitches such as the text
not showing up at all.
This wrapper can be removed in the future when libi3 is adapted to reuse
the same cairo surface as we do for all other drawing operations.
This patch creates all necessary windows for i3bar with 32-bit visuals if available.
It also introduces the possibility to define RGBA colors (next to RGB colors), which
allows the user to set the opacity of any color. This requires running a compositor.
With this patch we also start supporting _NET_SYSTEM_TRAY_VISUAL, which is necessary
for the tray icons so they create the tray window with the correct depth and visual.