]> Dogcows Code - chaz/openbox/commitdiff
set the window type hint on menus to be "popup menus"
authorDana Jansens <danakj@orodu.net>
Fri, 15 Feb 2008 04:04:54 +0000 (23:04 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 15 Feb 2008 04:04:54 +0000 (23:04 -0500)
openbox/menuframe.c
openbox/prop.c
openbox/prop.h

index ce77fc0fe689e9adda7ce242d2976d12f4becbe4..54f0cdbc525df36cfc52b27911316a2184af4b56 100644 (file)
@@ -21,6 +21,7 @@
 #include "client.h"
 #include "menu.h"
 #include "screen.h"
+#include "prop.h"
 #include "actions.h"
 #include "grab.h"
 #include "openbox.h"
@@ -89,6 +90,10 @@ ObMenuFrame* menu_frame_new(ObMenu *menu, guint show_from, ObClient *client)
     self->window = createWindow(RootWindow(ob_display, ob_screen),
                                 CWEventMask, &attr);
 
+    /* make it a popup menu type window */
+    PROP_SET32(self->window, net_wm_window_type, atom,
+               prop_atoms.net_wm_window_type_popup_menu);
+
     XSetWindowBorderWidth(ob_display, self->window, ob_rr_theme->mbwidth);
     XSetWindowBorder(ob_display, self->window,
                      RrColorPixel(ob_rr_theme->menu_border_color));
index c2b0b40fba45f40c08602511577c73c406fa03d5..695e441fea9f206bd7f3f69e4fa0ac13918e27b0 100644 (file)
@@ -112,6 +112,7 @@ void prop_startup(void)
     CREATE(net_wm_window_type_splash, "_NET_WM_WINDOW_TYPE_SPLASH");
     CREATE(net_wm_window_type_dialog, "_NET_WM_WINDOW_TYPE_DIALOG");
     CREATE(net_wm_window_type_normal, "_NET_WM_WINDOW_TYPE_NORMAL");
+    CREATE(net_wm_window_type_popup_menu, "_NET_WM_WINDOW_TYPE_POPUP_MENU");
 
     prop_atoms.net_wm_moveresize_size_topleft = 0;
     prop_atoms.net_wm_moveresize_size_top = 1;
index 464fe26dea1dd6fcfeec45fff68c31abfc2319db..ae423271f6bb68f77733b104ed9c8918da159530 100644 (file)
@@ -86,6 +86,10 @@ typedef struct Atoms {
     Atom net_wm_bottomright;
     Atom net_wm_bottomleft;
 
+    /* types that we use but don't support */
+
+    Atom net_wm_window_type_popup_menu;
+
     /* Everything below here must go in net_supported on the root window */
 
     /* root window properties */
This page took 0.024484 seconds and 4 git commands to generate.