]> git.eshelyaron.com Git - emacs.git/commitdiff
Set the extended window manager hint for tooltip windows.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 13 Dec 2009 15:39:28 +0000 (15:39 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 13 Dec 2009 15:39:28 +0000 (15:39 +0000)
* xfns.c (x_create_tip_frame): Set the extended window manager hint for
tooltip windows.

* xterm.h (struct x_display_info): Add Xatom_net_window_type_tooltip and
Xatom_net_window_type.

* xterm.c (x_term_init): Initialize Xatom_net_window_type_tooltip and
Xatom_net_window_type.

src/ChangeLog
src/xfns.c
src/xterm.c
src/xterm.h

index 692db938e61e96b66de0c7c381499c182731d3c5..a143e1d5739438b072c37b9e3e4f6ef26e74a7bd 100644 (file)
@@ -1,5 +1,16 @@
+2009-12-13  Pat Thoyts <patthoyts@users.sourceforge.net> (tiny change)
+
+       * xfns.c (x_create_tip_frame): Set the extended window manager hint for
+       tooltip windows.
+
 2009-12-13  Jan Djärv  <jan.h.d@swipnet.se>
 
+       * xterm.h (struct x_display_info): Add Xatom_net_window_type_tooltip and
+       Xatom_net_window_type.
+
+       * xterm.c (x_term_init): Initialize Xatom_net_window_type_tooltip and
+       Xatom_net_window_type.
+
        * xterm.c (my_log_handler): New function.
        (x_term_init): Set my_log_handler as log handler during gtk_init
        so we can filter out buggy messages. (bug #5120).
index 27d0b025a248f7228e442128c0df141f0065f987..b886a3ff67411e2936a7bac5976ccd94c74a5289 100644 (file)
@@ -4825,6 +4825,7 @@ x_create_tip_frame (dpyinfo, parms, text)
   {
     XSetWindowAttributes attrs;
     unsigned long mask;
+    Atom type = FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
 
     BLOCK_INPUT;
     mask = CWBackPixel | CWOverrideRedirect | CWEventMask;
@@ -4849,6 +4850,10 @@ x_create_tip_frame (dpyinfo, parms, text)
                       f->border_width,
                       CopyFromParent, InputOutput, CopyFromParent,
                       mask, &attrs);
+    XChangeProperty (FRAME_X_DISPLAY (f), tip_window,
+                     FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type,
+                     XA_ATOM, 32, PropModeReplace,
+                     (unsigned char *)&type, 1);
     UNBLOCK_INPUT;
   }
 
index dee6190e7554960b0bc35e5ea14299bfd2ee60e2..7f9f6f3c05e78e8a17dcfa6fd57c24a1e23512a4 100644 (file)
@@ -10445,7 +10445,11 @@ x_term_init (display_name, xrm_option, resource_name)
     = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
   dpyinfo->Xatom_net_wm_state_sticky
     = XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False);
-
+  dpyinfo->Xatom_net_window_type
+    = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
+  dpyinfo->Xatom_net_window_type_tooltip
+    = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE_TOOLTIP", False);
+  
   dpyinfo->cut_buffers_initialized = 0;
 
   dpyinfo->x_dnd_atoms_size = 8;
index 1ad2a097016b50e338ca5dbb1e96a1e69a992dd3..6c6de8d901d43e81c4e3c2dedf22d09c5d5ef234 100644 (file)
@@ -355,10 +355,12 @@ struct x_display_info
   size_t x_dnd_atoms_size;
   size_t x_dnd_atoms_length;
 
-  /* Extended window manager hints, Atoms supported by the window manager  */
+  /* Extended window manager hints, Atoms supported by the window manager and
+     atoms for settig the window type.  */
   Atom *net_supported_atoms;
   int nr_net_supported_atoms;
   Window net_supported_window;
+  Atom Xatom_net_window_type, Xatom_net_window_type_tooltip;
 
   /* Atoms dealing with maximization and fullscreen */
   Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen_atom,