From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp? Date: Fri, 12 Feb 2016 22:35:43 -0500 Message-ID: <56BEA48F.9020400@gmail.com> References: <56BDF3DE.2050704@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aDQ4F9KbVsFsPBmoQ5JNLVAGoOaVM1KBL" X-Trace: ger.gmane.org 1455334563 3163 80.91.229.3 (13 Feb 2016 03:36:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 03:36:03 +0000 (UTC) Cc: Emacs developers To: Chris Feng Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 13 04:35:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUQzy-0007yl-Ai for ged-emacs-devel@m.gmane.org; Sat, 13 Feb 2016 04:35:54 +0100 Original-Received: from localhost ([::1]:38697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUQzx-0005o5-C5 for ged-emacs-devel@m.gmane.org; Fri, 12 Feb 2016 22:35:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUQzt-0005nx-Sh for emacs-devel@gnu.org; Fri, 12 Feb 2016 22:35:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUQzq-00086A-Kv for emacs-devel@gnu.org; Fri, 12 Feb 2016 22:35:49 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.135]:52229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUQzq-000865-B5 for emacs-devel@gnu.org; Fri, 12 Feb 2016 22:35:46 -0500 Original-Received: from [18.189.87.242] ([18.189.87.242]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0M9tPw-1aJPS43Rmq-00B3Dv; Sat, 13 Feb 2016 04:35:45 +0100 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: X-Provags-ID: V03:K0:xlreJ06OD6CyEEv3o0/btlqjHTZUUNtZUWRBAMPrMgzcepWo7bx 6y7bawJH0ChgelMwtt0AesI94tF1CsEkvyXMYy7Sbtl1wCDijB1S4alSoX+CacdpOBY5TXQ Ez3zgvZ8WaZ+FUkh1O3n0pmRf0yxVP1SoC3RmOHmDuVOsssT5+NDdvJ5Csh7fZO4RtgWHCE UtNs2XLnMZ4uBP4kjEf7g== X-UI-Out-Filterresults: notjunk:1;V01:K0:D2yJb2tLF6k=:PnLfuHXCXFAeyxvF6oP/Ie KpdqcP0GglARMxD+8Fa2PJNmWvur2t6zzp+RkAjGela8CLd2pTZgtPfIRa5A6Smk7KPjM2qYg flmPdIy0mIdJRVydp/ZPw0L+deZ2OVbch2FGFnuxCxUm1+KSsm4iSI9iI4BpRbi2NXOFHb3+R oI9YppZ/O4ElQ5R4Etfse7Ah0c2su+K6ZO1gbDk/FovnM5ZyMFV0Joh5NnHJSFFc4WBL2LSyn oWJ+D+XisptjDVTF0r3uxB9MAqXv9ywErNB5Nr4bAES0FD16YuJpt6jNoqwTiJ2SJIbE+ssSf 8740bKoHIF4Dw+e4wipeS4tELRvQNIsP2G5TgQ5ASjW463NQNKXQQgzKpYWP0/LWlxYi6oRBM aSG9ErQDjd8eNLpn7urjiqQOaQ69WFfD/DtnZWxiSiOvSmavvOA/MkabwtujSSwHMjGyGCLBy RBLQ7aKctkNfIseXydHkRyIaUBN7yo0UITnCePU6Dn/8KWoKmAp/U6aFVom0rp6SaaYtcZjj4 5R/pVSg6Vrg5wcMmNHcRriXkF9qhkRBeGaYuAM5dYlobklCPPcvYI845/kcvzmQ0Cp38kv0n9 MdY4puw8LaCQZTNdLE1OMSK/wmskTm6hBU3Yb0ZEKDKjs7sKTy/SoTDFhgqq3eT5ghqRexccH BY9VWwumeJ8D2GsgsBDfGFEMsaTrRIiBRf2R7ptKrsHHH/2wNAFrwPDQ4OpkOIS5jOaI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.135 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199851 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aDQ4F9KbVsFsPBmoQ5JNLVAGoOaVM1KBL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/12/2016 09:15 PM, Chris Feng wrote: > I think the relevant part in 'x_create_tip_frame' is actually: >=20 > attrs.override_redirect =3D True; >=20 > What you want to do is to remove the decoration added by the window > manager. So you need to set the override-redirect flag on that X > window. You're right; thanks! I was navigating the C sources and reached that con= clusion as your email came :) It doesn't seem that there's any Elisp level facility to customize this f= lag, unfortunately. This means in particular that unless we patch the C s= ources, there won't be a cross platform solution to this issue, right? I've started thinking at what a patch would look like; presumably the ide= a would be to expose the functionality of x_create_tip_frame to Elisp, mo= ving parts of x_show_tip into that function. I could try coming up with a= patch, if this is deemed useful. There's one thing that confuses me, however: some code related to tooltip= s seems to be duplicated between xfns.c, w32fns.c, etc; are these files a= uto-generated? Or should I prepare a patch that adjusts all copies of tha= t code? >> Is there a way to create a borderless frame from Elisp? >=20 > You may have a look at XELB (available on ELPA). The following code > should create a frame without decoration. >=20 > (require 'xcb) >=20 > (setq frame (make-frame '((visibility . nil)))) >=20 > (let ((window (string-to-number (frame-parameter frame 'outer-window-= id))) > (connection (xcb:connect-to-socket))) > (xcb:+request connection > (make-instance 'xcb:ChangeWindowAttributes > :window window > :value-mask xcb:CW:OverrideRedirect > :override-redirect 1)) > (xcb:flush connection) > (xcb:disconnect connection)) >=20 > (make-frame-visible frame) This is really neat, actually :) Thanks a lot! It works great on my machi= ne. I'd still like to find a cross-platform solution, though; company isn't X= -specific. Am I right to think that this will only work on GNU/Linux? Cl=C3=A9ment. --aDQ4F9KbVsFsPBmoQ5JNLVAGoOaVM1KBL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWvqSPAAoJEPqg+cTm90wjgO4P/im9L3ZZNgzL+R2Y8KEv/K2U txDjus/YKzBnkBHPFjkrigfxhpp02xLaArJIih63sEQrq1Bpo4e71jlNgeNSqR6L RFQUdFGYQrFXDFg7HofyFuZYty+4YvVRAda2LbJsR74xIBvmLqKr7J9PnqysOqds 6Cmoa1oXgTokdA06S7JBl41oywmen0WmqXo41ybOwY9D6Lj8AZ0w2eprCCyYYS02 kFVYw2okCBtSJOCrhXMj6vIwkt3HE5013R9ecNaEfUvRM4KGk3jjnWUpIvhoYCgY hIGkhs9Nbf6RhEYE+/wB/9NCQXefLkFWcw0M04uomn+HuZoO1IFvKCrzkTiC/KS3 TOgyNM4J4UvTAqovBTJAAs4Bo/mxQS/2r2gBDwgRlZAzBDRXX/DFWxDspY+YyuXR n1igu6vNErbEVkC0cW8IXPSrmHNTZ+pg8/bBq/5jaNbPfDqPEB8VKy09AbUymdzV GVLBkw2Zry3g0EovUz33FJaxWqt4K35/tNWaaxSioeFtuOjROL3VHfgYtNJYhDd8 bsy27BProTLEU/tDi6c+l/Oxr6/NwY0oCa+q84twxsVll5a+YCoOZ9tNqeoEHT+A m6q5yba8mQl2DqsUQgXcwCY1e3f8UQDWiPcy3eYYTI35MkC1vguZnKCANj7+lja2 pamUsYnbjlugZ4ukh/tn =0cKb -----END PGP SIGNATURE----- --aDQ4F9KbVsFsPBmoQ5JNLVAGoOaVM1KBL--