Merge pull request #613 from alebastr/set-exclusive-zone

fix(bar): set exclusive zone early for gtk-layer-shell
This commit is contained in:
Alex 2020-03-04 16:29:06 +01:00 committed by GitHub
commit 2a7e8f7d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,6 +175,11 @@ void waybar::Bar::initGtkLayerShell() {
gtk_layer_set_margin(gtk_window, GTK_LAYER_SHELL_EDGE_RIGHT, margins_.right);
gtk_layer_set_margin(gtk_window, GTK_LAYER_SHELL_EDGE_TOP, margins_.top);
gtk_layer_set_margin(gtk_window, GTK_LAYER_SHELL_EDGE_BOTTOM, margins_.bottom);
if (width_ > 1 && height_ > 1) {
/* configure events are not emitted if the bar is using initial size */
setExclusiveZone(width_, height_);
}
}
#endif