changeset 106561:85bf88fe0269

Set the extended window manager hint for tooltip windows. * 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.
author Jan Djärv <jan.h.d@swipnet.se>
date Sun, 13 Dec 2009 15:39:28 +0000
parents e4fa191eaf50
children 0d89cb5de442
files src/ChangeLog src/xfns.c src/xterm.c src/xterm.h
diffstat 4 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Dec 13 14:24:22 2009 +0000
+++ b/src/ChangeLog	Sun Dec 13 15:39:28 2009 +0000
@@ -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).
--- a/src/xfns.c	Sun Dec 13 14:24:22 2009 +0000
+++ b/src/xfns.c	Sun Dec 13 15:39:28 2009 +0000
@@ -4825,6 +4825,7 @@
   {
     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 @@
 		       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;
   }
 
--- a/src/xterm.c	Sun Dec 13 14:24:22 2009 +0000
+++ b/src/xterm.c	Sun Dec 13 15:39:28 2009 +0000
@@ -10445,7 +10445,11 @@
     = 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;
--- a/src/xterm.h	Sun Dec 13 14:24:22 2009 +0000
+++ b/src/xterm.h	Sun Dec 13 15:39:28 2009 +0000
@@ -355,10 +355,12 @@
   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,