aboutsummaryrefslogtreecommitdiff
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
parent28c32c087adde2b7b1ede54fd3d4db796259ec9f (diff)
downloadfluxbox_paul-93ffd19686f27ae16fb547f1dafd298f9dc041ae.zip
fluxbox_paul-93ffd19686f27ae16fb547f1dafd298f9dc041ae.tar.bz2
init frame window in frame struct
-rw-r--r--src/Slit.cc27
-rw-r--r--src/Slit.hh9
2 files changed, 13 insertions, 23 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());
diff --git a/src/Slit.hh b/src/Slit.hh
index eea3ad2..8b3249f 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -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.hh,v 1.41 2004/06/07 11:46:04 rathnor Exp $ 25/// $Id: Slit.hh,v 1.42 2004/09/11 18:58:27 fluxgen Exp $
26 26
27#ifndef SLIT_HH 27#ifndef SLIT_HH
28#define SLIT_HH 28#define SLIT_HH
@@ -140,6 +140,13 @@ private:
140 std::string m_filename; 140 std::string m_filename;
141 141
142 struct frame { 142 struct frame {
143 frame(const FbTk::FbWindow &parent):
144 window(parent, 0, 0, 10, 10,
145 SubstructureRedirectMask | ButtonPressMask |
146 EnterWindowMask | LeaveWindowMask | ExposureMask,
147 true), // override redirect
148 x(0), y(0), x_hidden(0), y_hidden(0),
149 width(10), height(10) {}
143 Pixmap pixmap; 150 Pixmap pixmap;
144 FbTk::FbWindow window; 151 FbTk::FbWindow window;
145 152