From 14efe686cdc8023f9c984fc067206d40b07b2ad5 Mon Sep 17 00:00:00 2001 From: markt <markt> Date: Wed, 26 Jul 2006 01:22:42 +0000 Subject: added resource and menu item for maximizing over tabs --- ChangeLog | 3 +++ src/Screen.cc | 4 ++++ src/Screen.hh | 2 ++ src/Window.cc | 8 ++++++++ 4 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index e12a650..f60d954 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*06/07/26: + * Added resource and menu item for maximizing over external tabs (Mark) + Screen.cc/hh Window.cc *06/07/25: * Fix so that focus doesn't revert away from command dialogs (Mark) fluxbox.cc/hh CommandDialog.cc 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, altscrname+".overlay.CapStyle"), scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"), scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"), + max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"), default_internal_tabs(rm, false /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { @@ -1656,6 +1657,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar, "Tabs in Titlebar", "Tabs in Titlebar", *resource.default_internal_tabs, save_and_reconftabs); + tab_menu->insert(new BoolMenuItem(_FB_XTEXT(Common, MaximizeOver, + "Maximize Over", "Maximize over this thing when maximizing"), + *resource.max_over_tabs, save_and_reconfigure)); FbTk::MenuItem *tab_width_item = 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: inline const std::string &getScrollAction() const { return *resource.scroll_action; } inline const bool getScrollReverse() const { return *resource.scroll_reverse; } inline const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } + inline const bool getMaxOverTabs() const { return *resource.max_over_tabs; } inline unsigned int getTabWidth() const { return *resource.tab_width; } @@ -452,6 +453,7 @@ private: FbTk::Resource<FbTk::GContext::CapStyle> gc_cap_style; FbTk::Resource<std::string> scroll_action; FbTk::Resource<bool> scroll_reverse; + FbTk::Resource<bool> max_over_tabs; FbTk::Resource<bool> default_internal_tabs; } 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) { m_old_height = new_h; new_y = screen().maxTop(head); new_h = screen().maxBottom(head) - new_y - 2*frame().window().borderWidth(); + if (!screen().getMaxOverTabs()) { + new_y += yOffset(); + new_h -= heightOffset(); + } } maximized ^= MAX_VERT; } @@ -1747,6 +1751,10 @@ void FluxboxWindow::maximize(int type) { m_old_width = new_w; new_x = screen().maxLeft(head); new_w = screen().maxRight(head) - new_x - 2*frame().window().borderWidth(); + if (!screen().getMaxOverTabs()) { + new_x += xOffset(); + new_w -= widthOffset(); + } } maximized ^= MAX_HORZ; } -- cgit v0.11.2