diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbRootWindow.cc | 7 | ||||
-rw-r--r-- | src/FbRootWindow.hh | 2 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 4 | ||||
-rw-r--r-- | src/Screen.cc | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/FbRootWindow.cc b/src/FbRootWindow.cc index d17d56f..91bd695 100644 --- a/src/FbRootWindow.cc +++ b/src/FbRootWindow.cc | |||
@@ -30,7 +30,8 @@ FbRootWindow::FbRootWindow(int screen_num): | |||
30 | m_colormap(0), | 30 | m_colormap(0), |
31 | m_decorationDepth(0), | 31 | m_decorationDepth(0), |
32 | m_decorationVisual(0), | 32 | m_decorationVisual(0), |
33 | m_decorationColormap(0) { | 33 | m_decorationColormap(0), |
34 | m_maxDepth(depth()) { | ||
34 | 35 | ||
35 | Display *disp = FbTk::App::instance()->display(); | 36 | Display *disp = FbTk::App::instance()->display(); |
36 | 37 | ||
@@ -55,9 +56,9 @@ FbRootWindow::FbRootWindow(int screen_num): | |||
55 | 56 | ||
56 | for (int i = 0; i < vinfo_nitems; i++) { | 57 | for (int i = 0; i < vinfo_nitems; i++) { |
57 | if ((DefaultDepth(disp, screen_num) < vinfo_return[i].depth) | 58 | if ((DefaultDepth(disp, screen_num) < vinfo_return[i].depth) |
58 | && (static_cast<int>(depth()) < vinfo_return[i].depth)){ | 59 | && (m_maxDepth < vinfo_return[i].depth)){ |
59 | m_visual = vinfo_return[i].visual; | 60 | m_visual = vinfo_return[i].visual; |
60 | setDepth(vinfo_return[i].depth); | 61 | m_maxDepth = vinfo_return[i].depth; |
61 | } | 62 | } |
62 | 63 | ||
63 | if((m_decorationDepth < vinfo_return[i].depth) | 64 | if((m_decorationDepth < vinfo_return[i].depth) |
diff --git a/src/FbRootWindow.hh b/src/FbRootWindow.hh index 8e97cc3..739c9ef 100644 --- a/src/FbRootWindow.hh +++ b/src/FbRootWindow.hh | |||
@@ -41,6 +41,7 @@ public: | |||
41 | int decorationDepth() const { return m_decorationDepth; } | 41 | int decorationDepth() const { return m_decorationDepth; } |
42 | Visual *decorationVisual() const { return m_decorationVisual; } | 42 | Visual *decorationVisual() const { return m_decorationVisual; } |
43 | Colormap decorationColormap() const { return m_decorationColormap; } | 43 | Colormap decorationColormap() const { return m_decorationColormap; } |
44 | int maxDepth() const { return m_maxDepth; } | ||
44 | 45 | ||
45 | private: | 46 | private: |
46 | Visual *m_visual; | 47 | Visual *m_visual; |
@@ -49,6 +50,7 @@ private: | |||
49 | int m_decorationDepth; | 50 | int m_decorationDepth; |
50 | Visual *m_decorationVisual; | 51 | Visual *m_decorationVisual; |
51 | Colormap m_decorationColormap; | 52 | Colormap m_decorationColormap; |
53 | int m_maxDepth; | ||
52 | }; | 54 | }; |
53 | 55 | ||
54 | #endif // FBROOTWINDOW_HH | 56 | #endif // FBROOTWINDOW_HH |
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 48d6e87..42b81e7 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -115,8 +115,8 @@ FbWinFrame::FbWinFrame(BScreen &screen, unsigned int client_depth, | |||
115 | m_state(state), | 115 | m_state(state), |
116 | m_window(theme->screenNum(), state.x, state.y, state.width, state.height, s_mask, true, false, | 116 | m_window(theme->screenNum(), state.x, state.y, state.width, state.height, s_mask, true, false, |
117 | client_depth, InputOutput, | 117 | client_depth, InputOutput, |
118 | ((client_depth == 32) && (screen.rootWindow().depth() == 32) ? screen.rootWindow().visual() : CopyFromParent), | 118 | (client_depth == screen.rootWindow().maxDepth() ? screen.rootWindow().visual() : CopyFromParent), |
119 | ((client_depth == 32) && (screen.rootWindow().depth() == 32) ? screen.rootWindow().colormap() : CopyFromParent)), | 119 | (client_depth == screen.rootWindow().maxDepth() ? screen.rootWindow().colormap() : CopyFromParent)), |
120 | m_layeritem(window(), *screen.layerManager().getLayer(ResourceLayer::NORMAL)), | 120 | m_layeritem(window(), *screen.layerManager().getLayer(ResourceLayer::NORMAL)), |
121 | m_titlebar(m_window, 0, 0, 100, 16, s_mask, false, false, | 121 | m_titlebar(m_window, 0, 0, 100, 16, s_mask, false, false, |
122 | screen.rootWindow().decorationDepth(), InputOutput, | 122 | screen.rootWindow().decorationDepth(), InputOutput, |
diff --git a/src/Screen.cc b/src/Screen.cc index 2b5411d..94e4250 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -297,7 +297,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
297 | "using visual 0x%lx, depth %d\n", | 297 | "using visual 0x%lx, depth %d\n", |
298 | "informational message saying screen number (%d), visual (%lx), and colour depth (%d)").c_str(), | 298 | "informational message saying screen number (%d), visual (%lx), and colour depth (%d)").c_str(), |
299 | screenNumber(), XVisualIDFromVisual(rootWindow().visual()), | 299 | screenNumber(), XVisualIDFromVisual(rootWindow().visual()), |
300 | rootWindow().depth()); | 300 | rootWindow().maxDepth()); |
301 | #endif // DEBUG | 301 | #endif // DEBUG |
302 | 302 | ||
303 | FbTk::EventManager *evm = FbTk::EventManager::instance(); | 303 | FbTk::EventManager *evm = FbTk::EventManager::instance(); |