all repos — fluxbox @ 93ffd19686f27ae16fb547f1dafd298f9dc041ae

custom fork of the fluxbox windowmanager

init frame window in frame struct
fluxgen fluxgen
commit

93ffd19686f27ae16fb547f1dafd298f9dc041ae

parent

28c32c087adde2b7b1ede54fd3d4db796259ec9f

2 files changed, 13 insertions(+), 23 deletions(-)

jump to
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.100 2004/09/11 13:31:36 fluxgen Exp $ +// $Id: Slit.cc,v 1.101 2004/09/11 18:58:27 fluxgen Exp $ #include "Slit.hh"

@@ -251,6 +251,7 @@ *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),

m_clientlist_menu(scr.menuTheme(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), + frame(scr.rootWindow()), //For KDE dock applets m_kwm1_dockwindow(XInternAtom(FbTk::App::instance()->display(), "KWM_DOCKWINDOW", False)), //KDE v1.x

@@ -292,33 +293,15 @@ m_timer.fireOnce(true);

FbTk::RefCount<FbTk::Command> toggle_hidden(new FbTk::SimpleCommand<Slit>(*this, &Slit::toggleHidden)); m_timer.setCommand(toggle_hidden); - // create main window - XSetWindowAttributes attrib; - unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel | - CWColormap | CWOverrideRedirect | CWEventMask; - attrib.background_pixmap = None; - attrib.background_pixel = attrib.border_pixel = theme().borderColor().pixel(); - attrib.colormap = screen().rootWindow().colormap(); - attrib.override_redirect = True; - attrib.event_mask = s_eventmask; - - frame.x = frame.y = 0; - frame.width = frame.height = 1; - Display *disp = FbTk::App::instance()->display(); - frame.window = - XCreateWindow(disp, screen().rootWindow().window(), frame.x, frame.y, - frame.width, frame.height, theme().borderWidth(), - screen().rootWindow().depth(), InputOutput, screen().rootWindow().visual(), - create_mask, &attrib); FbTk::EventManager::instance()->add(*this, frame.window); frame.window.setAlpha(*m_rc_alpha); m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); m_layermenu.reset(new LayerMenu<Slit>(scr.menuTheme(), - scr.imageControl(), - *scr.layerManager(). - getLayer(Fluxbox::instance()->getMenuLayer()), + scr.imageControl(), + *scr.layerManager(). + getLayer(Fluxbox::instance()->getMenuLayer()), this, true)); moveToLayer((*m_rc_layernum).getNum());
M src/Slit.hhsrc/Slit.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: Slit.hh,v 1.41 2004/06/07 11:46:04 rathnor Exp $ +/// $Id: Slit.hh,v 1.42 2004/09/11 18:58:27 fluxgen Exp $ #ifndef SLIT_HH #define SLIT_HH

@@ -140,6 +140,13 @@ std::auto_ptr<LayerMenu<Slit> > m_layermenu;

std::string m_filename; struct frame { + frame(const FbTk::FbWindow &parent): + window(parent, 0, 0, 10, 10, + SubstructureRedirectMask | ButtonPressMask | + EnterWindowMask | LeaveWindowMask | ExposureMask, + true), // override redirect + x(0), y(0), x_hidden(0), y_hidden(0), + width(10), height(10) {} Pixmap pixmap; FbTk::FbWindow window;