summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2010-04-06 18:07:34 +0000
committerIan MacArthur <imacarthur@gmail.com>2010-04-06 18:07:34 +0000
commit20b508a3b55cf6530afc4da865e2533177d2ab1d (patch)
treee2f4cbb523ca4c2953986632ab53ffc31b4df60a /src
parent24b8386bf18f0ae1b07b3126e4ef90d80064fd8c (diff)
Submit Albrecht's minimal fix for str2082 - this "fixes" the erroneous window animations
on menu and tooltip items that were seen on some systems using compiz. Albrecht or Alvin may have more sophisticated fixes later, providing us with more control over window types under X11. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index aa046d757..d47170670 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1587,6 +1587,13 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
XSetWMHints(fl_display, xp->xid, hints);
XFree(hints);
}
+
+ // set the window type for menu and tooltip windows to avoid animations (compiz)
+ if (win->menu_window() || win->tooltip_window()) {
+ Atom net_wm_type = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE", False);
+ Atom net_wm_type_kind = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE_MENU", False);
+ int ret = XChangeProperty(fl_display, xp->xid, net_wm_type, XA_ATOM, 32, PropModeReplace, (unsigned char*)&net_wm_type_kind, 1);
+ }
XMapWindow(fl_display, xp->xid);
if (showit) {