Set _NET_WM_WINDOW_TYPE in menus. Looks bad with compiz otherwise.
xlwmenu.c (set_window_type): New function. (make_windows_if_needed, XlwMenuRealize): Call set_window_type.
This commit is contained in:
parent
f0bd159891
commit
7aad87e884
2 changed files with 21 additions and 0 deletions
|
|
@ -24,6 +24,8 @@
|
|||
(XlwMenuDestroy): Free pixmap. Call XtDestroyWidget instead of
|
||||
XDestroyWindow.
|
||||
(handle_motion_event): Only call handle_single_motion_event once.
|
||||
(set_window_type): New function.
|
||||
(make_windows_if_needed, XlwMenuRealize): Call set_window_type.
|
||||
|
||||
* xlwmenuP.h (window_state): Add pixmap and w.
|
||||
|
||||
|
|
|
|||
|
|
@ -1314,6 +1314,23 @@ expose_cb (Widget widget,
|
|||
display_menu (mw, i, False, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
set_window_type (Widget w, XlwMenuWidget mw)
|
||||
{
|
||||
int popup_menu_p = mw->menu.top_depth == 1;
|
||||
Atom type = XInternAtom (XtDisplay (w),
|
||||
popup_menu_p
|
||||
? "_NET_WM_WINDOW_TYPE_POPUP_MENU"
|
||||
: "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
|
||||
False);
|
||||
|
||||
XChangeProperty (XtDisplay (w), XtWindow (w),
|
||||
XInternAtom (XtDisplay (w), "_NET_WM_WINDOW_TYPE", False),
|
||||
XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char *)&type, 1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
make_windows_if_needed (mw, n)
|
||||
XlwMenuWidget mw;
|
||||
|
|
@ -1372,6 +1389,7 @@ make_windows_if_needed (mw, n)
|
|||
#ifdef HAVE_XFT
|
||||
windows [i].xft_draw = 0;
|
||||
#endif
|
||||
set_window_type (windows [i].w, mw);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2039,6 +2057,7 @@ XlwMenuRealize (w, valueMask, attributes)
|
|||
mw->menu.windows [0].width = w->core.width;
|
||||
mw->menu.windows [0].height = w->core.height;
|
||||
|
||||
set_window_type (mw->menu.windows [0].w, mw);
|
||||
create_pixmap_for_menu (&mw->menu.windows [0], mw);
|
||||
|
||||
#ifdef HAVE_XFT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue