[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99926: Set _NET_WM_WINDOW_TYPE in me
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99926: Set _NET_WM_WINDOW_TYPE in menus. Looks bad with compiz otherwise. |
Date: |
Sat, 17 Apr 2010 20:18:12 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99926
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sat 2010-04-17 20:18:12 +0200
message:
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.
modified:
lwlib/ChangeLog
lwlib/xlwmenu.c
=== modified file 'lwlib/ChangeLog'
--- a/lwlib/ChangeLog 2010-04-17 17:43:03 +0000
+++ b/lwlib/ChangeLog 2010-04-17 18:18:12 +0000
@@ -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.
=== modified file 'lwlib/xlwmenu.c'
--- a/lwlib/xlwmenu.c 2010-04-17 17:43:03 +0000
+++ b/lwlib/xlwmenu.c 2010-04-17 18:18:12 +0000
@@ -1315,6 +1315,23 @@
}
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;
int n;
@@ -1372,6 +1389,7 @@
#ifdef HAVE_XFT
windows [i].xft_draw = 0;
#endif
+ set_window_type (windows [i].w, mw);
}
}
@@ -2039,6 +2057,7 @@
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99926: Set _NET_WM_WINDOW_TYPE in menus. Looks bad with compiz otherwise.,
Jan D. <=