? tabsattacharea.cvs.patch ? doc/html Index: src/Window.cc =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/Window.cc,v retrieving revision 1.281 diff -a -b -B -p -u -r1.281 Window.cc --- src/Window.cc 18 Apr 2004 21:17:36 -0000 1.281 +++ src/Window.cc 21 Apr 2004 18:01:19 -0000 @@ -3095,9 +3095,16 @@ void FluxboxWindow::attachTo(int x, int // search for a fluxboxwindow WinClient *client = Fluxbox::instance()->searchWindow(child); FluxboxWindow *attach_to_win = 0; - if (client) + if (client) { + Fluxbox::TabsAttachArea area= Fluxbox::instance()->getTabsAttachArea(); + if (area == Fluxbox::ATTACH_AREA_WINDOW) attach_to_win = client->fbwindow(); - + else if (area == Fluxbox::ATTACH_AREA_TITLEBAR) { + if(client->fbwindow()->hasTitlebar() && + client->fbwindow()->y() + client->fbwindow()->titlebarHeight() > dest_y) + attach_to_win = client->fbwindow(); + } + } if (attach_to_win != this && attach_to_win != 0) { Index: src/fluxbox.cc =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/fluxbox.cc,v retrieving revision 1.239 diff -a -b -B -p -u -r1.239 fluxbox.cc --- src/fluxbox.cc 19 Apr 2004 22:45:44 -0000 1.239 +++ src/fluxbox.cc 21 Apr 2004 18:01:21 -0000 @@ -193,6 +193,15 @@ setFromString(char const *strval) { } template<> +void FbTk::Resource:: +setFromString(char const *strval) { + if (strcasecmp(strval, "Titlebar")==0) + m_value= Fluxbox::ATTACH_AREA_TITLEBAR; + else + m_value= Fluxbox::ATTACH_AREA_WINDOW; +} + +template<> void FbTk::Resource:: setFromString(const char *strval) { if (sscanf(strval, "%ul", &m_value) != 1) @@ -256,6 +265,15 @@ getString() { } template<> +std::string FbTk::Resource:: +getString() { + if (m_value == Fluxbox::ATTACH_AREA_TITLEBAR) + return "Titlebar"; + else + return "Window"; +} + +template<> string FbTk::Resource:: getString() { char tmpstr[128]; @@ -394,6 +412,7 @@ Fluxbox::Fluxbox(int argc, char **argv, m_rc_titlebar_right(m_resourcemanager, TitlebarList(&s_titlebar_right[0], &s_titlebar_right[3]), "session.titlebar.right", "Session.Titlebar.Right"), + m_rc_tabs_attach_area(m_resourcemanager, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"), m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), m_rc_auto_raise_delay(m_resourcemanager, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay"), Index: src/fluxbox.hh =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/fluxbox.hh,v retrieving revision 1.86 diff -a -b -B -p -u -r1.86 fluxbox.hh --- src/fluxbox.hh 19 Apr 2004 22:45:44 -0000 1.86 +++ src/fluxbox.hh 21 Apr 2004 18:01:22 -0000 @@ -107,6 +107,7 @@ public: /// obsolete enum Titlebar{SHADE=0, MINIMIZE, MAXIMIZE, CLOSE, STICK, MENU, EMPTY}; + enum TabsAttachArea{ATTACH_AREA_WINDOW= 0, ATTACH_AREA_TITLEBAR}; @@ -114,6 +115,7 @@ public: inline const std::vector& getTitlebarRight() const { return *m_rc_titlebar_right; } inline const std::vector& getTitlebarLeft() const { return *m_rc_titlebar_left; } + inline const Fluxbox::TabsAttachArea getTabsAttachArea() const { return *m_rc_tabs_attach_area; } inline const std::string &getStyleFilename() const { return *m_rc_stylefile; } inline const std::string &getMenuFilename() const { return *m_rc_menufile; } @@ -252,6 +254,7 @@ private: FbTk::Resource m_rc_titlebar_left, m_rc_titlebar_right; + FbTk::Resource m_rc_tabs_attach_area; FbTk::Resource m_rc_cache_life, m_rc_cache_max; FbTk::Resource m_rc_auto_raise_delay; FbTk::Resource m_rc_use_mod1; /// temporary!, to disable mod1 for resize/move