mirror of
https://github.com/swaywm/sway.git
synced 2025-11-03 09:01:43 -05:00
Extract workspace size computation from render_workspace_button()
Also remove some unnecessary strtup()s and rename a few variables and functions.
This commit is contained in:
parent
103954dd2b
commit
c805e42635
3 changed files with 27 additions and 15 deletions
|
|
@ -32,6 +32,9 @@ struct workspace {
|
|||
bool urgent;
|
||||
};
|
||||
|
||||
/** Global bar state */
|
||||
extern struct bar swaybar;
|
||||
|
||||
/**
|
||||
* Setup bar.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,4 +14,9 @@ void render(struct output *output, struct config *config, struct status_line *li
|
|||
*/
|
||||
void set_window_height(struct window *window, int height);
|
||||
|
||||
/**
|
||||
* Compute the size of a workspace name
|
||||
*/
|
||||
void workspace_button_size(struct window *window, const char *workspace_name, int *width, int *height);
|
||||
|
||||
#endif /* _SWAYBAR_RENDER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue