aboutsummaryrefslogtreecommitdiff
path: root/src/Tab.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-02 12:58:37 (GMT)
committerfluxgen <fluxgen>2002-08-02 12:58:37 (GMT)
commitc28bd74febd7587a2ab10c5b1b6554f6ed8a5ff3 (patch)
treec095c7cf37af19f6b3d602a43a27f8e977792e0b /src/Tab.cc
parent378c946d89569afcfe61fcafcf90fa0247673da9 (diff)
downloadfluxbox-c28bd74febd7587a2ab10c5b1b6554f6ed8a5ff3.zip
fluxbox-c28bd74febd7587a2ab10c5b1b6554f6ed8a5ff3.tar.bz2
added autogrouping-from-tab patch from Steve Cooper
Diffstat (limited to 'src/Tab.cc')
-rw-r--r--src/Tab.cc38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index a98aef6..ebe8760 100644
--- a/src/Tab.cc
+++ b/src/Tab.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: Tab.cc,v 1.29 2002/07/23 17:11:59 fluxgen Exp $ 22// $Id: Tab.cc,v 1.30 2002/08/02 12:57:19 fluxgen Exp $
23 23
24#include "Tab.hh" 24#include "Tab.hh"
25 25
@@ -654,11 +654,25 @@ void Tab::buttonPressEvent(XButtonEvent *be) {
654 //draw in pressed mode 654 //draw in pressed mode
655 draw(true); 655 draw(true);
656 656
657 //set window to titlewindow so we can take advatage of drag function 657 //invoke root menu with auto-glueing?
658 be->window = m_win->frame.title; 658 if (be->button == 3) {
659 BScreen *screen = m_win->getScreen();
660 Rootmenu *rootmenu = screen->getRootmenu();
661 if (! rootmenu->isVisible()) {
662 Fluxbox::instance()->checkMenu();
663 screen->getRootmenu()->move(be->x_root, be->y_root-rootmenu->titleHeight());
664 rootmenu->setAutoGroupWindow(m_win->getClientWindow());
665 rootmenu->show();
666 }
667 }
668 //otherwise let the window handle the event
669 else {
670 //set window to titlewindow so we can take advantage of drag function
671 be->window = m_win->frame.title;
659 672
660 //call windows buttonpress eventhandler 673 //call windows buttonpress eventhandler
661 m_win->buttonPressEvent(be); 674 m_win->buttonPressEvent(be);
675 }
662} 676}
663 677
664//----------- buttonReleaseEvent ---------- 678//----------- buttonReleaseEvent ----------
@@ -1186,3 +1200,17 @@ Tab::Alignment Tab::getTabAlignmentNum(const char *string) {
1186 } 1200 }
1187 return ANONE; 1201 return ANONE;
1188} 1202}
1203
1204//---------- addWindowToGroup ------------
1205// Add a window the the tabbed group
1206//----------------------------------------
1207bool Tab::addWindowToGroup(FluxboxWindow *otherWindow)
1208{
1209 if (!otherWindow || otherWindow == m_win)
1210 return false;
1211 Tab *otherTab = otherWindow->getTab();
1212 if (!otherTab)
1213 return false;
1214 insert(otherTab);
1215 return true;
1216}