[PATCH] Xwayland: Don't notify RR of an unchanged size

Preston Carpenter apragmaticplace at gmail.com
Mon Apr 23 16:59:50 UTC 2018


On Sun, Apr 22, 2018 at 2:18 PM, Matt Turner <mattst88 at gmail.com> wrote:
>
>
> Do you mind using your real name?


Sure, here is the patch again with my real name.

From: Preston Carpenter <APragmaticPlace at gmail.com>

On Wayland compositors such as Sway and Way Cooler Xwayland windows will
be scaled twice if a TTY change occurs. This is due to sending the
output mode information twice, causing it to be applied twice to RandR.

This patch does not notify RandR if the size did not change, covering
the case where a TTY was suspended and then later resumed.

Signed-off-by: Preston Carpenter <APragmaticPlace at gmail.com>
---
 hw/xwayland/xwayland-output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 48faeb142..dc988ed2f 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -194,7 +194,7 @@ update_screen_size(struct xwl_output *xwl_output, int
width, int height)

     SetRootClip(xwl_screen->screen, xwl_screen->root_clip_mode);

-    if (xwl_screen->screen->root) {
+    if (xwl_screen->screen->root && xwl_output->width != width &&
xwl_output->height != height) {
         BoxRec box = { 0, 0, width, height };

         xwl_screen->screen->root->drawable.width = width;
--
2.17.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180423/c2a27023/attachment.html>


More information about the xorg-devel mailing list