mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
xdg: fix de-synced SSD when shrinking Thunderbird window
On a slow mechine or heavy load, we sometimes see de-synced SSD with
Thunderbird windows when shrinking it. Here's how it happened:
1. Labwc sends a configure event.
2. The configure event timeouts and labwc resets view->{pending,current}
with the old geometry.
3. Thunderbird updates the toplevel window geometry and the toplevel
surface size, but not the subsurface size. Then it sends a commit.
4. Since now the committed window geometry and view->pending are
different, the workaround for Qt apps is applied and the whole surface
extent is set to view->current. Thus SSD stays in the old geometry.
5. Thunderbird finally updates the subsurface size.
So, this commit fixes this conflict between Thunderbird and the workaround
for Qt apps by using the toplevel surface size instead of the whole
surface extent to update view->current.
This commit is contained in:
parent
3394f191a4
commit
014d07651f
1 changed files with 9 additions and 2 deletions
11
src/xdg.c
11
src/xdg.c
|
|
@ -161,8 +161,15 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
*/
|
||||
if (size.width != view->pending.width
|
||||
|| size.height != view->pending.height) {
|
||||
struct wlr_box extent;
|
||||
wlr_surface_get_extends(xdg_surface->surface, &extent);
|
||||
/*
|
||||
* Not using wlr_surface_get_extend() since Thunderbird
|
||||
* sometimes resizes the window geometry and the toplevel
|
||||
* surface size, but not the subsurface size (see #2183).
|
||||
*/
|
||||
struct wlr_box extent = {
|
||||
.width = view->surface->current.width,
|
||||
.height = view->surface->current.height,
|
||||
};
|
||||
if (extent.width == view->pending.width
|
||||
&& extent.height == view->pending.height) {
|
||||
wlr_log(WLR_DEBUG, "window geometry for client (%s) "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue