mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
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
This commit is contained in:
parent
a7f26939c2
commit
cfea40dce3
1 changed files with 2 additions and 5 deletions
|
@ -265,13 +265,10 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
|
||||||
view->visible = true;
|
view->visible = true;
|
||||||
view->is_focused = true;
|
view->is_focused = true;
|
||||||
view->sticky = false;
|
view->sticky = false;
|
||||||
// Setup geometry
|
|
||||||
struct wlc_geometry geometry;
|
|
||||||
wlc_view_get_visible_geometry(handle, &geometry);
|
|
||||||
view->width = 0;
|
view->width = 0;
|
||||||
view->height = 0;
|
view->height = 0;
|
||||||
view->desired_width = geometry.size.w;
|
view->desired_width = -1;
|
||||||
view->desired_height = geometry.size.h;
|
view->desired_height = -1;
|
||||||
// setup border
|
// setup border
|
||||||
view->border_type = config->border;
|
view->border_type = config->border;
|
||||||
view->border_thickness = config->border_thickness;
|
view->border_thickness = config->border_thickness;
|
||||||
|
|
Loading…
Reference in a new issue