Commit Graph

39 Commits

Author SHA1 Message Date
cd1d4fa183 Stop tracking action blocks in renderer
Dispatch can now directly get the current position from the renderer and
create action blocks with the proper coordinates.
2021-02-12 20:01:22 +01:00
7a569c4b98 Remove mousebtn argument from action_open 2021-02-12 20:01:22 +01:00
464bedb33c Store all action info in action_context
The renderer is responsible for setting the start and end positions
while dispatch does the rest
2021-02-12 20:01:22 +01:00
f359540b5d renderer: Move change_alignment into interface 2021-02-12 20:01:22 +01:00
96239597ed Move most action state out of renderer
The renderer now only stores the positions of the actions because that
is specific to the renderer and because the actual position can only be
finalized after all the rendering is done because intitially the
positions are relative to the alignment and not the bar.
2021-02-12 20:01:22 +01:00
0a474bb2f2 Move trivial formatting state into tags::context
The variables storing the current colors, attribute activations and font
were only used in a single place and can easily also be read from the
context.

This allows us to remove a lot of the state of the renderer.
2021-02-12 20:01:22 +01:00
5d518e171e renderer: Use interface to render offset 2021-02-12 20:01:22 +01:00
d5be8cad97 Add compiler warning for missing override specifier (#2341)
* build: Add -Wsuggest-override

We should always use the override specifier when overriding virtual
functions. This helps prevent errors when a subclass tries to create a
function with the same name as a virtual function in a super-class but
with a different purpose.

* clang-format

* Upload logs on failure

* Add override to unsupported.hpp

* cmake: Make -Wsuggest-override flag conditional
2021-01-04 10:38:43 +01:00
413c911cd1 Move apply_alpha functionality into rgba 2020-11-27 22:08:03 +01:00
3655106a14 Adapt the renderer side to always use rgba 2020-11-27 22:08:03 +01:00
211b0bbfd8 Incorporate Reviews 2019-08-06 21:36:20 +02:00
57d364a2fc Reset all tags at the end of a module
The %{PR} tag is introduced for this. It resets all colors as well as
the activation of the underline and overline and font.

This has become necessary because we don't track what raw tags a user
injects into the formatting string and otherwise their raw tags could
bleed through.

This doesn't touch action tags because even before raw action tags
weren't being tracked. Action tags also have the requirement that they
have to be used in pairs, so closing them prematurely could break things
(for example with click actions for the entire bar)
2019-08-06 21:36:20 +02:00
7256366112 fix(tray): correctly handle transparency when using offset (#1571)
This patch adds support for observing multiple slices of the desktop background.
This is used for the tray so that it doesn't have to rely on the bar's rect to
get the desktop background. In particular, it now handles the case where the
tray is not contained fully within the bar's outer rect (for example, when using tray-offset-{x,y})

Co-Authored-By: bennofs <benno.fuenfstueck@gmail.com>
2019-01-05 01:08:18 +01:00
eacf5ce5ba fix(tray): fix transparency after background manager changes
The systray only supports pseudo transparency (real transparency would require
much larger changes) so the real transparency should only be used for the bar itself.
2018-10-04 15:52:03 +02:00
3de914abca feat(render): support pseudo-transparency
This adds pseudo-transparency for the background of the bar and the
background of the systray.
2018-10-04 15:52:03 +02:00
0bd8f1f69a fix(parser): Proper handling of %{R} #585 2017-05-17 23:11:06 +02:00
3e4a4ce78f fix(renderer): Alignment blocks 2017-01-27 15:36:37 +01:00
8138a12381 refactor(renderer): Cleanup 2017-01-25 23:38:51 +01:00
c7f33e2567 refactor(renderer): Use redirection groups instead of pixmaps 2017-01-25 09:54:18 +01:00
a5d6670121 refactor(clang-tidy): Apply fixes 2017-01-24 08:01:04 +01:00
8b9461e63e wip(refactor): Cairo drawing 2017-01-24 07:41:46 +01:00
452afcdc68 refactor: Integral types 2017-01-24 07:11:14 +01:00
5e1886a312 wip(refactor): Cairo drawing 2017-01-24 07:11:14 +01:00
00ac4bea63 refactor(x11): Header cleanup 2016-12-26 10:27:30 +01:00
11aabac227 refactor(connection: Use custom base 2016-12-26 09:46:48 +01:00
c14c46b998 refactor: Font index cleanup 2016-12-20 15:09:11 +01:00
b2e8428550 wip(refactor): Improve parsing and font glyph caching 2016-12-15 17:28:58 +01:00
9f9f438fae refactor: Remove last usage of boost::optional
Since it's the only thing boost was used for at the moment
we drop it to be able to get rid of a dependency.
2016-12-15 17:13:16 +01:00
4fca0c89b4 refactor: Object construction 2016-12-14 11:01:44 +01:00
1a2a6e5fab refactor: Construction methods 2016-12-14 11:01:44 +01:00
08be86fbe1 wip(refactor): Improve signal and event handling 2016-12-14 11:01:44 +01:00
7f5117b7cc fix(tray): Improve pseudo-transparency handling
- Make sure previously drawn content is cleared
- Redraw tray clients on XCB_EXPOSE
- Prevent void parts of the root pixmap being copied

Ref #187
2016-12-05 03:56:04 +01:00
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
6f2b437be3 fix(renderer): Destroy window on deconstruct 2016-11-25 14:17:56 +01:00
9fdc22843b refactor: Cleanup rendering 2016-11-25 04:42:27 +01:00
84d58e7619 refactor: Cleanup handling of syntax tags 2016-11-25 04:34:24 +01:00
4794ef653c refactor(renderer): Separate methods 2016-11-22 23:18:47 +01:00
c6e861083b fix: Avoid unnecessary color change
Ref #181
2016-11-22 22:45:12 +01:00
25e33b6aab refactor: Separate render component 2016-11-21 16:16:02 +01:00