aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/render.c
Commit message (Collapse)AuthorAge
* Rebase #1636 against current masterLibravatar v44r2019-01-31
|
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
* Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedLibravatar Drew DeVault2019-01-13
|\ | | | | Improve mouse button parsing: bar mouse bindings
| * bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* | Merge pull request #3397 from RedSoxFan/fix-swaybar-heightLibravatar Drew DeVault2019-01-13
|\ \ | | | | | | swaybar: obey height if given
| * | swaybar: obey height if givenLibravatar Brian Ashworth2019-01-09
| | | | | | | | | | | | | | | If there is a bar height given, use that as the height rather than as a minimum height. This matches i3-gaps behavior.
* | | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | | | | | | This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
* | | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
| |/ |/| | | | | | | | | Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
* | swaybar: fix rendering of border and backgroundLibravatar Brian Ashworth2019-01-09
|/ | | | | | | | This fixes the rendering of borders and backgrounds for blocks. This also makes the following changes: * both borders and padding are scaled with the output * both lines and rectangles are rendered without an antialiasing to avoid bleeding outside the desired area
* swaybar: add tray interfaceLibravatar Ian Fan2018-12-31
|
* swaybar: fix sep block width for mixed scalesLibravatar Brian Ashworth2018-12-12
| | | | | | | | | | | | | When there are outputs with mixed scales, it was possible for swaybar to alter `block->separator_block_width` for an output with a higher scale, and use the changed value for a lower scale output. This caused there to be larger than normal separation between blocks on the lower scale outputs. The issue is more obvious the larger the scale difference between the highest scale output and the lowest scale output. This fixes the issue by using a local variable that is originally set to `block->separator_block_width` for rendering, but if it needs to be increased, the local variable is the only thing touched.
* swaybar: handle block->urgentLibravatar Brian Ashworth2018-12-12
| | | | | | | When `block->urgent` is set, use the urgent colors. This matches i3bar's behavior. Previously, swaybar just ignored the property. This also adds in rendering for right borders, which was missing.
* Add relative coordinates in JSON for i3bar click eventsLibravatar Hristo Venev2018-12-04
| | | | Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
* Implement bar gapsLibravatar Brian Ashworth2018-11-28
| | | | | | | | | Adds the bar subcommand `gaps <amount>|<horizontal> <vertical>|<top> <right> <bottom> <left>` to set gaps for swaybar. Due to restrictions on margins for a layer_surface, only the sides that are anchored to an edge of the screen can have gaps. Since there is support for per-side outer gaps for workspaces, those should be able to be used instead for the last side.
* Implement strip_workspace_name.Libravatar Connor E2018-11-17
|
* swaybar: reverse order of workspaces listLibravatar Ian Fan2018-10-25
| | | | | This makes it congruent with its visual appearance, making it easier to reason about.
* swaybar: render with minimum height, nominally text heightLibravatar Ian Fan2018-10-20
|
* swaybar: when hiding bar, save old height to be restored upon reshowLibravatar Ian Fan2018-10-14
| | | | | | | | Previously, when the bar was hidden, the height would be set to 0. This meant that if the bar was empty upon reshow, it would not render since the height was still 0, which made it seem there was a problem. Now, the height is not reset, but the width is, to indicate upon reshow that the layer surface needed reconfiguring.
* swaybar: handle mode/hidden_state changesLibravatar Ian Fan2018-10-14
| | | | | | | | | As well as adding the hidden_state property to the bar config struct, this commit handles barconfig_update events when the mode or hidden_state changes, and uses a new function determine_bar_visibility to hide or show the bar as required, using, respectively, destroy_layer_surface, which is also newly added, and add_layer_surface, which has been changed to allow dynamically adding the surface.
* swaybar: move mode & mode_pango_markup to bar structLibravatar Ian Fan2018-10-14
| | | | | | This distinguishes the binding mode from the distinct config mode, as well as removing mode_pango_markup from the config struct where it should not be present.
* swaybar: add free_hotspots helper functionLibravatar Ian Fan2018-10-14
|
* swaybar: synchronize rendering to output framesLibravatar Ian Fan2018-09-30
|
* swaybar: trim function prototypesLibravatar Ian Fan2018-09-28
|
* swaybar: move i3bar definitions into separate fileLibravatar Ian Fan2018-09-28
|
* swaybar, swaylock, & tree/container: Set cairo font options to render text ↵Libravatar Geoff Greer2018-09-22
| | | | and lines with subpixel hinting (if available).
* swaybar: don't wl_display_roundtrip on each frameLibravatar emersion2018-09-20
| | | | | | | This was the source of numerous bugs, from hotplug events not being received to segfaults because wl_display_roundtrip was making the bar process unplug events while blocking in an iteration over all outputs.
* swaybar: handle hotpluggingLibravatar emersion2018-09-20
| | | | Don't kill and respawn swaybars on hotplug.
* swaybar: rewrite i3bar protocol handlingLibravatar Ian Fan2018-09-18
| | | | | | | | This now correctly handles an incoming json infinite array by shifting most of the heavy listing to the json-c parser, as well as sending multiple statuses at once. It also removes the struct i3bar_protocol_state and moves its members into the status_line struct, allowing the same buffer to be used for both protocols.
* swaybar: only create i3bar block hotspot if click events are enabledLibravatar Ian Fan2018-09-18
|
* i3bar: count references to blocksLibravatar Ian Fan2018-09-12
| | | | | | | | | This prevents blocks from being destroyed before their hotspots are destroyed, in case it is used for a pending click event that fires between the bar receiving a new status, which destroys the block, and the bar rendering the new status, which destroys the hotspot; this problem can be easily produced by scrolling on a block that immediately causes a new status to be sent, with multiple outputs
* Align titles to baselineLibravatar Ryan Dwyer2018-09-08
| | | | | | | | | | | | | This does the following: * Adds a baseline argument to get_text_size (the baseline is the distance from the top of the texture to the baseline). * Stores the baseline in the container when calculating the title height. * Takes the baseline into account when calculating the config's max font height. * When rendering, pads the textures according to the baseline so they line up.
* Fix swaybar block background fill logicLibravatar Jason2018-09-05
| | | Same as #2571 but for 1.0.
* swaybar: Fix scroll handling on workspace buttonsLibravatar minus2018-07-19
| | | | | | | | | | As well as ignoring scroll events on status elements when click_events is enabled. Previously, using the scroll wheel on a workspace button would switch to that workspace instead of scrolling through them. Clicks and scrolling on status elements would always be processed by swaybar, too. So in case you were using scrolling as volume control on a status item, swaybar would additionally scroll through your workspaces.
* make hotspot callback take an x11 button idLibravatar Peter Rice2018-07-16
|
* swaybar/bg: Fix crash on DPMS offLibravatar minus2018-07-14
| | | | | When turning off displays via DPMS, swaybar and swaybg still tried to render, but did not get a valid buffer, causing them to crash.
* Fix swaybar teardown when workspace buttons hiddenLibravatar Brian Ashworth2018-07-06
|
* Implement mode --pango_markupLibravatar Brian Ashworth2018-07-05
|
* Swaybar: Respect pango_markup configLibravatar Ryan Dwyer2018-05-09
| | | | | Makes swaybar respect the user's pango_markup configuration in the workspace buttons and binding mode indicator.
* Fix separator height calculationLibravatar Drew DeVault2018-04-10
| | | | | | | Fixes #1796 Also rearranged this code to more closely mirror the similar code above so future discrepancies are easier to spot.
* Check height in surface local coordinates and rename some variables.Libravatar Ryan Dwyer2018-04-11
|
* Fix swaybar not showing all status blocks.Libravatar Ryan Dwyer2018-04-10
|
* Fix swaybar HiDPI rounding issueLibravatar emersion2018-04-08
|
* Fixup for #1773Libravatar Drew DeVault2018-04-08
|
* Use full ws->name in swaybar hotspot callbackLibravatar db2018-04-08
| | | | | If strip_workspace_numbers option is enabled, we must preserve the right workspace name for hotspot.
* Handle output removal on swaybarLibravatar Drew DeVault2018-04-05
|
* Address review feedbackLibravatar Drew DeVault2018-04-03
|
* Adjust height calculation, namingLibravatar Drew DeVault2018-04-03
|
* Add hidpi support to swaybarLibravatar Drew DeVault2018-04-03
|
* Render blocks the correct orderLibravatar Drew DeVault2018-04-02
|
* Fix use-after-free with block hotspotsLibravatar Drew DeVault2018-04-02
|