From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pat Thoyts Newsgroups: gmane.emacs.devel Subject: [PATCH] Set the extended window manager hint for tooltip windows. Date: Sun, 13 Dec 2009 13:02:48 +0000 Message-ID: <87tyvvjabr.fsf@users.sourceforge.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260710387 5159 80.91.229.12 (13 Dec 2009 13:19:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2009 13:19:47 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 13 14:19:40 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJoMN-0004Wd-K2 for ged-emacs-devel@m.gmane.org; Sun, 13 Dec 2009 14:19:39 +0100 Original-Received: from localhost ([127.0.0.1]:50105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJoMN-0007Un-8J for ged-emacs-devel@m.gmane.org; Sun, 13 Dec 2009 08:19:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJoMG-0007Tj-CM for emacs-devel@gnu.org; Sun, 13 Dec 2009 08:19:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJoMA-0007QA-Fh for emacs-devel@gnu.org; Sun, 13 Dec 2009 08:19:30 -0500 Original-Received: from [199.232.76.173] (port=36109 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJoMA-0007Po-6y for emacs-devel@gnu.org; Sun, 13 Dec 2009 08:19:26 -0500 Original-Received: from smtp-out3.blueyonder.co.uk ([195.188.213.6]:39282) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJoM9-0002RT-VJ for emacs-devel@gnu.org; Sun, 13 Dec 2009 08:19:26 -0500 Original-Received: from [172.23.170.138] (helo=anti-virus01-09) by smtp-out3.blueyonder.co.uk with smtp (Exim 4.52) id 1NJoM3-0004h6-Eb; Sun, 13 Dec 2009 13:19:19 +0000 Original-Received: from [92.238.221.8] (helo=badger.patthoyts.tk) by asmtp-out2.blueyonder.co.uk with esmtp (Exim 4.52) id 1NJoM3-0005UX-0C; Sun, 13 Dec 2009 13:19:19 +0000 Original-Received: by badger.patthoyts.tk (Postfix, from userid 1000) id 3287B13D3D7; Sun, 13 Dec 2009 13:19:17 +0000 (GMT) X-Face: .`d#euqz@6H{"; Ysmx2IVe_7M3vA+2w1X[QLk?ZO&QRauXQL{*L'$3getx}9+zK.-KWDx3. qrlR)76MFb`6bgoGvLpLtcQKB=X~; * List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118584 Archived-At: The extended window manager hints specification provides a window type hint that indicates the intended use of a window and allows the window manager to better manage the window decoration and animation. This patch sets the EWMH type for the emacs tooltip window. The effect can be seen when using a window manager like compiz that applies an animation per window type when a different animation is set for closure of normal and tooltip windows. Using emacs with this patch applied ensures that tooltips from emacs act just like tooltips from any other application on the desktop. 2009-12-12 Pat Thoyts * src/xfns.c: Set the extended window manager hint for tooltip windows. diff --git a/src/xfns.c b/src/xfns.c index 27d0b02..0143323 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4849,6 +4849,17 @@ x_create_tip_frame (dpyinfo, parms, text) f->border_width, CopyFromParent, InputOutput, CopyFromParent, mask, &attrs); + + { + Atom keyAtom, typeAtom; + keyAtom = XInternAtom (FRAME_X_DISPLAY (f), + "_NET_WM_WINDOW_TYPE", False); + typeAtom = XInternAtom (FRAME_X_DISPLAY (f), + "_NET_WM_WINDOW_TYPE_TOOLTIP", False); + XChangeProperty (FRAME_X_DISPLAY (f), tip_window, keyAtom, + XA_ATOM, 32, PropModeReplace, + (unsigned char *)&typeAtom, 1); + } UNBLOCK_INPUT; }