From 66f0ad89bca2451556716fa749621486ab0204a6 Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Mon, 4 May 2009 16:52:30 -0400 Subject: Fix SystemTray owner window error Apparently InputOnly windows must actually 'CopyFromParent' and cannot use the "Default" settings of the root window. --- src/FbTk/FbWindow.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 342e968..eb11629 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -103,12 +103,15 @@ FbWindow::FbWindow(const FbWindow &parent, m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0) { - Visual *visual = DefaultVisual(display(), 0); - Colormap cmap = DefaultColormap(display(), 0); - if (depth == CopyFromParent) { - depth = DefaultDepth(display(), 0); - } else { - printf("WARNING: Non-standard depth reqested %d\n", depth); + Visual *visual = CopyFromParent; + Colormap cmap = CopyFromParent; + + if (class_type == InputOutput) { + visual = DefaultVisual(display(), 0); + cmap = DefaultColormap(display(), 0); + if (depth == CopyFromParent) { + depth = DefaultDepth(display(), 0); + } } create(parent.window(), x, y, width, height, eventmask, -- cgit v0.11.2