From e79258fe743c3ec0d0faf12541cdcec865fc7533 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 11 Apr 2007 20:27:25 +0000 Subject: added session.screen.maxIgnoreIncrement --- ChangeLog | 6 ++++++ src/IconButton.cc | 1 + src/Screen.cc | 23 ++++++++++++++++++++--- src/Screen.hh | 3 ++- src/Window.cc | 13 +++++++++---- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ed32dc..0e805db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ (Format: Year/Month/Day) Changes for 1.1: +*07/04/11: + * Added resource session.screen.maxIgnoreIncrement: , to + disable size checking when maximizing a window (e.g. terminals) (Mark) + - Also added a new configuration submenu for maximize options, to be filled + at a later date + Screen.cc/hh Window.cc *07/04/08: * Added OnToolbar modifier to keys file (Mark) Keys.cc/hh Toolbar.cc/hh Screen.cc/hh IconbarTool.cc fluxbox.cc diff --git a/src/IconButton.cc b/src/IconButton.cc index 04fc391..34fe532 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -65,6 +65,7 @@ IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme, FbTk::EventManager::instance()->add(*this, m_icon_window); + reconfigTheme(); update(0); } diff --git a/src/Screen.cc b/src/Screen.cc index d433907..65ac45a 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -286,6 +286,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, image_dither(rm, false, scrname+".imageDither", altscrname+".ImageDither"), opaque_move(rm, false, scrname + ".opaqueMove", altscrname+".OpaqueMove"), full_max(rm, false, scrname+".fullMaximization", altscrname+".FullMaximization"), + max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement", altscrname+".MaxIgnoreIncrement"), workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), auto_raise(rm, true, scrname+".autoRaise", altscrname+".AutoRaise"), @@ -1809,6 +1810,25 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { // END focus menu + // BEGIN maximize menu + + FbTk::FbString maxmenu_label = _FB_XTEXT(Configmenu, MaxMenu, + "Maximize Options", "heading for maximization options"); + FbTk::Menu *maxmenu = createMenu(maxmenu_label); + + _BOOLITEM(*maxmenu, Configmenu, FullMax, + "Full Maximization", "Maximise over slit, toolbar, etc", + *resource.full_max, saverc_cmd); + _BOOLITEM(*maxmenu, Configmenu, MaxIgnoreInc, + "Ignore Resize Increment", + "Maximizing Ignores Resize Increment (e.g. xterm)", + *resource.max_ignore_inc, saverc_cmd); + + maxmenu->updateMenu(); + menu.insert(maxmenu_label, maxmenu); + + // END maximize menu + // BEGIN tab menu FbTk::FbString tabmenu_label = _FB_XTEXT(Configmenu, TabMenu, @@ -1881,9 +1901,6 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { "Opaque Window Moving", "Window Moving with whole window visible (as opposed to outline moving)", *resource.opaque_move, saverc_cmd); - _BOOLITEM(menu, Configmenu, FullMax, - "Full Maximization", "Maximise over slit, toolbar, etc", - *resource.full_max, saverc_cmd); try { _BOOLITEM(menu, Configmenu, FocusNew, "Focus New Windows", "Focus newly created windows", diff --git a/src/Screen.hh b/src/Screen.hh index 0354b99..b459f3f 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -123,6 +123,7 @@ public: bool clickRaises() const { return *resource.click_raises; } bool doOpaqueMove() const { return *resource.opaque_move; } bool doFullMax() const { return *resource.full_max; } + bool getMaxIgnoreIncrement() const { return *resource.max_ignore_inc; } bool doShowWindowPos() const { return *resource.show_window_pos; } bool decorateTransient() const { return *resource.decorate_transient; } const std::string &defaultDeco() const { return *resource.default_deco; } @@ -559,7 +560,7 @@ private: const std::string &altscrname); FbTk::Resource image_dither, opaque_move, full_max, - workspace_warping, show_window_pos, + max_ignore_inc, workspace_warping, show_window_pos, auto_raise, click_raises, decorate_transient; FbTk::Resource default_deco; FbTk::Resource rootcommand; diff --git a/src/Window.cc b/src/Window.cc index 09b048b..d0f28ce 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1716,10 +1716,15 @@ void FluxboxWindow::maximize(int type) { m_last_resize_w = new_w; m_last_resize_h = new_h; - ResizeDirection old_resize_corner = m_resize_corner; - m_resize_corner = NOCORNER; - fixsize(0, 0, true); - m_resize_corner = old_resize_corner; + // frankly, that xterm bug was pretty obscure, and it's really annoying not + // being able to maximize my terminals, so we make an option + // but we do fix size hints when restoring the window to normal size + if (!screen().getMaxIgnoreIncrement() || !maximized) { + ResizeDirection old_resize_corner = m_resize_corner; + m_resize_corner = NOCORNER; + fixsize(0, 0, (maximized ? true : false)); + m_resize_corner = old_resize_corner; + } moveResize(m_last_resize_x, m_last_resize_y, m_last_resize_w, m_last_resize_h); -- cgit v0.11.2