aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2006-07-26 01:22:42 (GMT)
committermarkt <markt>2006-07-26 01:22:42 (GMT)
commit14efe686cdc8023f9c984fc067206d40b07b2ad5 (patch)
treef81d24f8e4b6e2eb28255d64722995cc9bf3abbb /src
parent9229f8bc9ceae2505d7715cdea6e75aeb1b2c78b (diff)
downloadfluxbox-14efe686cdc8023f9c984fc067206d40b07b2ad5.zip
fluxbox-14efe686cdc8023f9c984fc067206d40b07b2ad5.tar.bz2
added resource and menu item for maximizing over tabs
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc4
-rw-r--r--src/Screen.hh2
-rw-r--r--src/Window.cc8
3 files changed, 14 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 7924984..38ca9ff 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -287,6 +287,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
287 altscrname+".overlay.CapStyle"), 287 altscrname+".overlay.CapStyle"),
288 scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"), 288 scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"),
289 scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"), 289 scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"),
290 max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"),
290 default_internal_tabs(rm, false /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { 291 default_internal_tabs(rm, false /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") {
291 292
292 293
@@ -1656,6 +1657,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1656 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar, 1657 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar,
1657 "Tabs in Titlebar", "Tabs in Titlebar", 1658 "Tabs in Titlebar", "Tabs in Titlebar",
1658 *resource.default_internal_tabs, save_and_reconftabs); 1659 *resource.default_internal_tabs, save_and_reconftabs);
1660 tab_menu->insert(new BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,
1661 "Maximize Over", "Maximize over this thing when maximizing"),
1662 *resource.max_over_tabs, save_and_reconfigure));
1659 1663
1660 FbTk::MenuItem *tab_width_item = 1664 FbTk::MenuItem *tab_width_item =
1661 new IntResMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth, 1665 new IntResMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth,
diff --git a/src/Screen.hh b/src/Screen.hh
index d4aea5e..ecfc619 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -140,6 +140,7 @@ public:
140 inline const std::string &getScrollAction() const { return *resource.scroll_action; } 140 inline const std::string &getScrollAction() const { return *resource.scroll_action; }
141 inline const bool getScrollReverse() const { return *resource.scroll_reverse; } 141 inline const bool getScrollReverse() const { return *resource.scroll_reverse; }
142 inline const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } 142 inline const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; }
143 inline const bool getMaxOverTabs() const { return *resource.max_over_tabs; }
143 144
144 inline unsigned int getTabWidth() const { return *resource.tab_width; } 145 inline unsigned int getTabWidth() const { return *resource.tab_width; }
145 146
@@ -452,6 +453,7 @@ private:
452 FbTk::Resource<FbTk::GContext::CapStyle> gc_cap_style; 453 FbTk::Resource<FbTk::GContext::CapStyle> gc_cap_style;
453 FbTk::Resource<std::string> scroll_action; 454 FbTk::Resource<std::string> scroll_action;
454 FbTk::Resource<bool> scroll_reverse; 455 FbTk::Resource<bool> scroll_reverse;
456 FbTk::Resource<bool> max_over_tabs;
455 FbTk::Resource<bool> default_internal_tabs; 457 FbTk::Resource<bool> default_internal_tabs;
456 458
457 } resource; 459 } resource;
diff --git a/src/Window.cc b/src/Window.cc
index f2b57f2..fdff04c 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1728,6 +1728,10 @@ void FluxboxWindow::maximize(int type) {
1728 m_old_height = new_h; 1728 m_old_height = new_h;
1729 new_y = screen().maxTop(head); 1729 new_y = screen().maxTop(head);
1730 new_h = screen().maxBottom(head) - new_y - 2*frame().window().borderWidth(); 1730 new_h = screen().maxBottom(head) - new_y - 2*frame().window().borderWidth();
1731 if (!screen().getMaxOverTabs()) {
1732 new_y += yOffset();
1733 new_h -= heightOffset();
1734 }
1731 } 1735 }
1732 maximized ^= MAX_VERT; 1736 maximized ^= MAX_VERT;
1733 } 1737 }
@@ -1747,6 +1751,10 @@ void FluxboxWindow::maximize(int type) {
1747 m_old_width = new_w; 1751 m_old_width = new_w;
1748 new_x = screen().maxLeft(head); 1752 new_x = screen().maxLeft(head);
1749 new_w = screen().maxRight(head) - new_x - 2*frame().window().borderWidth(); 1753 new_w = screen().maxRight(head) - new_x - 2*frame().window().borderWidth();
1754 if (!screen().getMaxOverTabs()) {
1755 new_x += xOffset();
1756 new_w -= widthOffset();
1757 }
1750 } 1758 }
1751 maximized ^= MAX_HORZ; 1759 maximized ^= MAX_HORZ;
1752 } 1760 }