aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorDrew DeVault <ddevault@linode.com>2016-09-05 11:36:48 -0400
committerDrew DeVault <ddevault@linode.com>2016-09-05 11:36:48 -0400
commitb2226ac6551f18275fadbcb3bc16a06d2a3dd97f (patch)
tree65628cb83abaa546c5f0e2cd8949c55aacb40360 /swaybar/bar.c
parent61184e3208c28b24a84aae5f5f0005311283826d (diff)
Add client support for HiDPI
This adds HiDPI support to swaybar, swaybg, and swaylock.
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index f3767409..7ec3e0ea 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -152,12 +152,15 @@ void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id) {
struct output_state *output = bar_output->registry->outputs->items[bar_output->idx];
- bar_output->window = window_setup(bar_output->registry, output->width * output->scale, 30 * output->scale, false);
+ bar_output->window = window_setup(bar_output->registry,
+ output->width / output->scale, 30, output->scale, false);
if (!bar_output->window) {
sway_abort("Failed to create window.");
}
- desktop_shell_set_panel(bar_output->registry->desktop_shell, output->output, bar_output->window->surface);
- desktop_shell_set_panel_position(bar_output->registry->desktop_shell, bar->config->position);
+ desktop_shell_set_panel(bar_output->registry->desktop_shell,
+ output->output, bar_output->window->surface);
+ desktop_shell_set_panel_position(bar_output->registry->desktop_shell,
+ bar->config->position);
window_make_shell(bar_output->window);