mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix: remove redundant roundtrip
This commit is contained in:
parent
d2d9db23b5
commit
9d3255fe9f
@ -20,7 +20,6 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
height_ = 0;
|
||||
width_ = 1;
|
||||
}
|
||||
window.set_size_request(width_, height_);
|
||||
|
||||
auto gtk_window = window.gobj();
|
||||
auto gtk_widget = GTK_WIDGET(gtk_window);
|
||||
@ -43,8 +42,6 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
auto height = config["height"].isUInt() ? config["height"].asUInt() : height_;
|
||||
auto width = config["width"].isUInt() ? config["width"].asUInt() : width_;
|
||||
|
||||
window.signal_configure_event().connect_notify(sigc::mem_fun(*this, &Bar::onConfigure));
|
||||
|
||||
std::size_t anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP;
|
||||
if (config["position"] == "bottom") {
|
||||
anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
||||
@ -70,9 +67,11 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
|
||||
setMarginsAndZone(height, width);
|
||||
|
||||
wl_surface_commit(surface);
|
||||
wl_display_roundtrip(client->wl_display);
|
||||
|
||||
setupWidgets();
|
||||
|
||||
window.set_size_request(width_, height_);
|
||||
window.signal_configure_event().connect_notify(sigc::mem_fun(*this, &Bar::onConfigure));
|
||||
}
|
||||
|
||||
void waybar::Bar::setMarginsAndZone(uint32_t height, uint32_t width) {
|
||||
|
Loading…
Reference in New Issue
Block a user