diff options
author | fluxgen <fluxgen> | 2002-12-16 11:17:26 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-16 11:17:26 (GMT) |
commit | 550b9760ddecf9bfc013708b2bf612e3aa07e4b3 (patch) | |
tree | a2d1b8bf3b20040c33d424360c2926be8f4b7891 /src/FbTk/FbWindow.cc | |
parent | 03078bcd8e11a585796f554ea38da59846d1b332 (diff) | |
download | fluxbox-550b9760ddecf9bfc013708b2bf612e3aa07e4b3.zip fluxbox-550b9760ddecf9bfc013708b2bf612e3aa07e4b3.tar.bz2 |
parent and showSubwindows function
Diffstat (limited to 'src/FbTk/FbWindow.cc')
-rw-r--r-- | src/FbTk/FbWindow.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 4a3f66c..3a3040b 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbWindow.cc,v 1.2 2002/12/03 21:59:58 fluxgen Exp $ | 22 | // $Id: FbWindow.cc,v 1.3 2002/12/16 11:17:26 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWindow.hh" | 24 | #include "FbWindow.hh" |
25 | 25 | ||
@@ -32,7 +32,8 @@ namespace FbTk { | |||
32 | 32 | ||
33 | Display *FbWindow::s_display = 0; | 33 | Display *FbWindow::s_display = 0; |
34 | 34 | ||
35 | FbWindow::FbWindow():m_window(0) { | 35 | FbWindow::FbWindow():m_parent(0), m_screen_num(0), m_window(0) { |
36 | |||
36 | if (s_display == 0) | 37 | if (s_display == 0) |
37 | s_display = App::instance()->display(); | 38 | s_display = App::instance()->display(); |
38 | } | 39 | } |
@@ -41,7 +42,9 @@ FbWindow::FbWindow(int screen_num, | |||
41 | int x, int y, size_t width, size_t height, long eventmask, | 42 | int x, int y, size_t width, size_t height, long eventmask, |
42 | bool override_redirect, | 43 | bool override_redirect, |
43 | int depth, | 44 | int depth, |
44 | int class_type) { | 45 | int class_type): |
46 | m_screen_num(screen_num), | ||
47 | m_parent(0) { | ||
45 | 48 | ||
46 | create(RootWindow(FbTk::App::instance()->display(), screen_num), | 49 | create(RootWindow(FbTk::App::instance()->display(), screen_num), |
47 | x, y, width, height, eventmask, | 50 | x, y, width, height, eventmask, |
@@ -51,7 +54,9 @@ FbWindow::FbWindow(int screen_num, | |||
51 | FbWindow::FbWindow(const FbWindow &parent, | 54 | FbWindow::FbWindow(const FbWindow &parent, |
52 | int x, int y, size_t width, size_t height, long eventmask, | 55 | int x, int y, size_t width, size_t height, long eventmask, |
53 | bool override_redirect, | 56 | bool override_redirect, |
54 | int depth, int class_type) { | 57 | int depth, int class_type): |
58 | m_parent(&parent), | ||
59 | m_screen_num(parent.screenNumber()) { | ||
55 | 60 | ||
56 | create(parent.window(), x, y, width, height, eventmask, | 61 | create(parent.window(), x, y, width, height, eventmask, |
57 | override_redirect, depth, class_type); | 62 | override_redirect, depth, class_type); |
@@ -106,6 +111,10 @@ void FbWindow::show() { | |||
106 | XMapWindow(s_display, m_window); | 111 | XMapWindow(s_display, m_window); |
107 | } | 112 | } |
108 | 113 | ||
114 | void FbWindow::showSubwindows() { | ||
115 | XMapSubwindows(s_display, m_window); | ||
116 | } | ||
117 | |||
109 | void FbWindow::hide() { | 118 | void FbWindow::hide() { |
110 | XUnmapWindow(s_display, m_window); | 119 | XUnmapWindow(s_display, m_window); |
111 | } | 120 | } |
@@ -138,6 +147,9 @@ void FbWindow::raise() { | |||
138 | XRaiseWindow(s_display, m_window); | 147 | XRaiseWindow(s_display, m_window); |
139 | } | 148 | } |
140 | 149 | ||
150 | int FbWindow::screenNumber() const { | ||
151 | return m_screen_num; | ||
152 | } | ||
141 | void FbWindow::updateGeometry() { | 153 | void FbWindow::updateGeometry() { |
142 | if (m_window == 0) | 154 | if (m_window == 0) |
143 | return; | 155 | return; |