emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Set the extended window manager hint for tooltip windows.


From: Pat Thoyts
Subject: [PATCH] Set the extended window manager hint for tooltip windows.
Date: Sun, 13 Dec 2009 13:02:48 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (usg-unix-v)

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 <address@hidden>

        * 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;
   }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]