From c82a622a64f5005646a6c66e7deb27d7ab7629c0 Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Mon, 4 May 2009 16:52:30 -0400 Subject: Fix SystemTray owner window Apparently InputOnly windows must actually 'CopyFromParent' and cannot use the "Default" settings. --- 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