From 209ba75bac5f6109d2a2929bc8b1f8c81d22925a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 30 Mar 2004 13:48:38 +0000 Subject: optional decoration of transient windows, patch from Scott Moser --- src/Screen.cc | 7 ++++++- src/Screen.hh | 5 +++-- src/Window.cc | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 750902f..5941c1d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.272 2004/03/23 09:21:29 fluxgen Exp $ +// $Id: Screen.cc,v 1.273 2004/03/30 13:46:34 fluxgen Exp $ #include "Screen.hh" @@ -474,6 +474,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), + decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), resizemode(rm, "", scrname+".resizeMode", altscrname+".ResizeMode"), focus_model(rm, CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), @@ -2321,6 +2322,10 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { "Desktop MouseWheel Switching"), *resource.desktop_wheeling, saverc_cmd)); + menu.insert(new + BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuDecorateTransient, + "Decorate Transient Windows"), + *resource.decorate_transient, saverc_cmd)); menu.insert(new BoolMenuItem("Click Raises", *resource.click_raises, saverc_cmd)); diff --git a/src/Screen.hh b/src/Screen.hh index 707f831..b84b950 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.136 2004/03/22 21:01:10 fluxgen Exp $ +// $Id: Screen.hh,v 1.137 2004/03/30 13:45:20 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH @@ -103,6 +103,7 @@ public: inline bool doFocusLast() const { return *resource.focus_last; } inline bool doShowWindowPos() const { return *resource.show_window_pos; } inline bool antialias() const { return *resource.antialias; } + inline bool decorateTransient() const { return *resource.decorate_transient; } inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); } const FbTk::Menu &getRootmenu() const { return *m_rootmenu.get(); } @@ -421,7 +422,7 @@ private: sloppy_window_grouping, workspace_warping, desktop_wheeling, show_window_pos, focus_last, focus_new, - antialias, auto_raise, click_raises; + antialias, auto_raise, click_raises, decorate_transient; FbTk::Resource rootcommand; FbTk::Resource resizemode; FbTk::Resource focus_model; diff --git a/src/Window.cc b/src/Window.cc index ac719c0..106f8fe 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.272 2004/03/28 17:48:20 fluxgen Exp $ +// $Id: Window.cc,v 1.273 2004/03/30 13:48:38 fluxgen Exp $ #include "Window.hh" @@ -464,7 +464,7 @@ void FluxboxWindow::init() { m_client->updateTransientInfo(); // adjust the window decorations based on transience and window sizes - if (m_client->isTransient()) { + if (m_client->isTransient() && !screen().decorateTransient()) { decorations.maximize = functions.maximize = false; decorations.handle = false; } -- cgit v0.11.2