aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-09 22:51:58 +0200
committerMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-09 23:20:26 +0200
commitcfea40dce3b203962a61b6f745bffebad43d19a6 (patch)
tree2b2bd1e9196d6e7ef98d58f88b0cecfea7f7d9b2 /sway
parenta7f26939c2921e5118cbd03081f71493a4a0a3fa (diff)
Don't init desired width/height on new_view
When creating a new view, wlc usually returns an initial geometry with size 1x1. Setting those values as desired width/height causes a problem for some windows (QT5) because they don't request a new geometry for instance when made floating, so the floating window becomes 1x1. To fix this problem we can just omit setting the desired width/height on new_view and instead let the clients request a certain size if they feel like it. e.i. gnome-calculator. Fix #578
Diffstat (limited to 'sway')
-rw-r--r--sway/container.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/container.c b/sway/container.c
index d82a1e21..6dfc608d 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -265,13 +265,10 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
view->visible = true;
view->is_focused = true;
view->sticky = false;
- // Setup geometry
- struct wlc_geometry geometry;
- wlc_view_get_visible_geometry(handle, &geometry);
view->width = 0;
view->height = 0;
- view->desired_width = geometry.size.w;
- view->desired_height = geometry.size.h;
+ view->desired_width = -1;
+ view->desired_height = -1;
// setup border
view->border_type = config->border;
view->border_thickness = config->border_thickness;