mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 00:16:22 +01:00
transaction: don't reconfigure X views unless integral coords changed
Sway logical coordinates are doubles, but they get truncated to integers when sent to Xwayland through `xcb_configure_window`. X11 apps will not respond to duplicate configure requests (from their truncated point of view) and cause transactions to time out. Fixes #5035.
This commit is contained in:
parent
33affb33d2
commit
5bd6a5ce3f
1 changed files with 6 additions and 2 deletions
|
@ -397,8 +397,12 @@ static bool should_configure(struct sway_node *node,
|
||||||
// Xwayland views are position-aware and need to be reconfigured
|
// Xwayland views are position-aware and need to be reconfigured
|
||||||
// when their position changes.
|
// when their position changes.
|
||||||
if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) {
|
if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) {
|
||||||
if (cstate->content_x != istate->content_x ||
|
// Sway logical coordinates are doubles, but they get truncated to
|
||||||
cstate->content_y != istate->content_y) {
|
// integers when sent to Xwayland through `xcb_configure_window`.
|
||||||
|
// X11 apps will not respond to duplicate configure requests (from their
|
||||||
|
// truncated point of view) and cause transactions to time out.
|
||||||
|
if ((int)cstate->content_x != (int)istate->content_x ||
|
||||||
|
(int)cstate->content_y != (int)istate->content_y) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue