-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi,
the attached patch "fixes" (see commit message for details) X-clients which sets WindowBorderWidth. To more easily see the problem you can try to run 'xterm -bw 3 -bd green' HW42 -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJXpMXsAAoJEOSsySeKZGgWEfQP/jH+Nj+Jfv1wQMfMFypinbNp 9J7U/3KaANIVuZ9UwtMaRSeU3RqFAvHmDBKiiJ4mZwVeJG2OEsAYM+MSdm6F5XFf F56ctk7CY7DcRcD85RZYNzpRxh5kkuKB3l0xLa1zghaMmFWfbczIo10XkmctryUo 3x90cEApmwqVsC3dkAM8oBLmy+aC1t9abe98O7vRxBMwp+33/TXreLED7DkaQbI+ dBXkcUmVJVPRtcl5f/L3goZZcXAJFUmj+N+sC2Fv4T8zHEBSkdVuCBtR42aJ2CkL vEx6D0KMBBoCqfsxg+CKtbzPtswz1Lnv1/d5wolRytJLBZEAls4us9bqsSiY/gxK aDQCgBXjofBJlLeNBeewSgbmFJqpn4X4PGGnaBC/o/0W5C+CsgLPzM69MWnsy2mg Lo5gTJ5TK3iIUdNq7wA69hywoWx636C0NVpv9DQZ4u0f+ush0GB2RD67t098r53z gvCJMAG1Hi/2df4FDF8IpJqsiNr8Z5RwMogPGbU8r0qYGHXMAhZLDa5lc9iP/skT edcF9TdyeCzyMvnzpH2dAU7pKIVrxjCTxYOMsLhw4nerozg0VEw2cUwVW/aia8dx hObPat/sW7fUe8/42Jl1Tg3gyCeoOann3IIud1n7/D6Ud4fjB7ReQFGp/X1hcxv6 H7xMeBkUfx4Di+/TWdMy =b3Y0 -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "qubes-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-devel/871ded94-1cbf-2722-1e62-0830de9fde4d%40ipsumj.de. For more options, visit https://groups.google.com/d/optout.
From d392d266e37aca867c3fcf6f628754ce327a205a Mon Sep 17 00:00:00 2001 From: HW42 <[email protected]> Date: Fri, 5 Aug 2016 17:23:57 +0200 Subject: [PATCH] vmside: force WindowBorderWidth to zero X has some (old) features for drawing windows borders through the X-server. Most X-clients like GTK don't use this feature but some classic X-clients like xterm do. The problem is that this border is included in the graphic memory which is shared with dom0. Since it is ignored in the x/y/width/height values passed to gui-daemon this leads to croping the window and artifacts due to damage events with wrong coordinates. This patches simply resets the WindowBorderWidth value to zero if a X-client sets it to something else. kwin and xfwm seem to do the same. --- gui-agent/vmside.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui-agent/vmside.c b/gui-agent/vmside.c index fed1453..4ec2581 100644 --- a/gui-agent/vmside.c +++ b/gui-agent/vmside.c @@ -186,6 +186,10 @@ void process_xevent_createnotify(Ghandles * g, XCreateWindowEvent * ev) wd->mfndump_pending = False; list_insert(windows_list, ev->window, wd); + if (attr.border_width > 0) { + XSetWindowBorderWidth(g->display, ev->window, 0); + } + if (attr.class != InputOnly) XDamageCreate(g->display, ev->window, XDamageReportRawRectangles); @@ -475,6 +479,7 @@ void send_wmnormalhints(Ghandles * g, XID window, int ignore_fail) fprintf(stderr, "error reading WM_NORMAL_HINTS\n"); return; } + /* Nasty workaround for KDE bug affecting gnome-terminal (shrinks to minimal size) */ /* https://bugzilla.redhat.com/show_bug.cgi?id=707664 */ if ((size_hints.flags & (PBaseSize|PMinSize|PResizeInc)) == @@ -688,6 +693,11 @@ void process_xevent_configure(Ghandles * g, XID window, } return; } + + if (ev->border_width > 0) { + XSetWindowBorderWidth(g->display, window, 0); + } + hdr.type = MSG_CONFIGURE; hdr.window = window; conf.x = ev->x; -- 2.8.1
0001-vmside-force-WindowBorderWidth-to-zero.patch.sig
Description: PGP signature
