aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-09-11 18:58:27 (GMT)
committerfluxgen <fluxgen>2004-09-11 18:58:27 (GMT)
commit93ffd19686f27ae16fb547f1dafd298f9dc041ae (patch)
treeebbd633dd3028e04614883f7c2e73ba0458ee8dc /src/Slit.cc
parent28c32c087adde2b7b1ede54fd3d4db796259ec9f (diff)
downloadfluxbox-93ffd19686f27ae16fb547f1dafd298f9dc041ae.zip
fluxbox-93ffd19686f27ae16fb547f1dafd298f9dc041ae.tar.bz2
init frame window in frame struct
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index dc14d42..0023965 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.100 2004/09/11 13:31:36 fluxgen Exp $ 25// $Id: Slit.cc,v 1.101 2004/09/11 18:58:27 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -251,6 +251,7 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
251 m_clientlist_menu(scr.menuTheme(), 251 m_clientlist_menu(scr.menuTheme(),
252 scr.imageControl(), 252 scr.imageControl(),
253 *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), 253 *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),
254 frame(scr.rootWindow()),
254 //For KDE dock applets 255 //For KDE dock applets
255 m_kwm1_dockwindow(XInternAtom(FbTk::App::instance()->display(), 256 m_kwm1_dockwindow(XInternAtom(FbTk::App::instance()->display(),
256 "KWM_DOCKWINDOW", False)), //KDE v1.x 257 "KWM_DOCKWINDOW", False)), //KDE v1.x
@@ -292,33 +293,15 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
292 FbTk::RefCount<FbTk::Command> toggle_hidden(new FbTk::SimpleCommand<Slit>(*this, &Slit::toggleHidden)); 293 FbTk::RefCount<FbTk::Command> toggle_hidden(new FbTk::SimpleCommand<Slit>(*this, &Slit::toggleHidden));
293 m_timer.setCommand(toggle_hidden); 294 m_timer.setCommand(toggle_hidden);
294 295
295 // create main window
296 XSetWindowAttributes attrib;
297 unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
298 CWColormap | CWOverrideRedirect | CWEventMask;
299 attrib.background_pixmap = None;
300 attrib.background_pixel = attrib.border_pixel = theme().borderColor().pixel();
301 attrib.colormap = screen().rootWindow().colormap();
302 attrib.override_redirect = True;
303 attrib.event_mask = s_eventmask;
304
305 frame.x = frame.y = 0;
306 frame.width = frame.height = 1;
307 Display *disp = FbTk::App::instance()->display();
308 frame.window =
309 XCreateWindow(disp, screen().rootWindow().window(), frame.x, frame.y,
310 frame.width, frame.height, theme().borderWidth(),
311 screen().rootWindow().depth(), InputOutput, screen().rootWindow().visual(),
312 create_mask, &attrib);
313 296
314 FbTk::EventManager::instance()->add(*this, frame.window); 297 FbTk::EventManager::instance()->add(*this, frame.window);
315 298
316 frame.window.setAlpha(*m_rc_alpha); 299 frame.window.setAlpha(*m_rc_alpha);
317 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); 300 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer));
318 m_layermenu.reset(new LayerMenu<Slit>(scr.menuTheme(), 301 m_layermenu.reset(new LayerMenu<Slit>(scr.menuTheme(),
319 scr.imageControl(), 302 scr.imageControl(),
320 *scr.layerManager(). 303 *scr.layerManager().
321 getLayer(Fluxbox::instance()->getMenuLayer()), 304 getLayer(Fluxbox::instance()->getMenuLayer()),
322 this, 305 this,
323 true)); 306 true));
324 moveToLayer((*m_rc_layernum).getNum()); 307 moveToLayer((*m_rc_layernum).getNum());