# # author: mathias gumz # about: # # enhances fluxbox to automatically shades unfocussed windows and # unshades focussed ones. # # init-file: # # session.autoShadeDelay: # session.autoUnshadeDelay: # # session.screen.autoShade: or via configmenu # # you can disable it per window via the windowmenu or the apps-file: # # [app] (xterm) # [autoshade] {no|yes} # [end] # # or use the AutoShade submenu in the configure-menu # # new resources: # # session.screen.autoShadeModel: # defines what happens when the mouse enters unfocussed window's # titlebar, possible options: # # NoAutoShade - nothing happens (except you have *SloppyFocus) # SloppyAutoShade - unfocussed windows rollout, tabs change # SemiSloppyAutoShade - unfocussed windows rollout, tabs dont change # # ! no change of current active window, its just to help find the right # window by seeing whats in it ! # # session.screen.newWindowsAutoShadeable: # are new windows autoshadeable on creation or not. # ##################################################################### # the patch itself contains some modifications to fluxbox itself # which are kind of .. reordering nature for fluxbox, have nothing # todo with autoshading .. but since this patch is for testing only # ... :) have fun to try things out Index: src/Ewmh.cc =================================================================== --- src/Ewmh.cc (Revision 4069) +++ src/Ewmh.cc (Arbeitskopie) @@ -866,13 +866,15 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { if (state == m_net_wm_state_sticky) { // STICKY - if (value && !win.isStuck() || - (!value && win.isStuck())) + if (value) win.stick(); + else + win.unstick(); } else if (state == m_net_wm_state_shaded) { // SHADED - if ((value && !win.isShaded()) || - (!value && win.isShaded())) + if (value) win.shade(); + else + win.unshade(); } else if (state == m_net_wm_state_maximized_horz ) { // maximized Horizontal if ((value && !win.isMaximized()) || (!value && win.isMaximized())) @@ -906,7 +908,7 @@ if (state == m_net_wm_state_sticky) { win.stick(); } else if (state == m_net_wm_state_shaded){ - win.shade(); + win.toggleShade(); } else if (state == m_net_wm_state_maximized_horz ) { // maximized Horizontal win.maximizeHorizontal(); } else if (state == m_net_wm_state_maximized_vert) { // maximized Vertical Index: src/AutoShadeModelMenuItem.hh =================================================================== --- src/AutoShadeModelMenuItem.hh (Revision 0) +++ src/AutoShadeModelMenuItem.hh (Revision 0) @@ -0,0 +1,52 @@ +// AutoShadeModelMenuItem.hh for Fluxbox +// Copyright (c) 2005 Mathias Gumz (akira at fluxbox dot org) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +// $Id: $ + +#ifndef AUTOSHADEMODELMENUITEM_HH +#define AUTOSHADEMODELMENUITEM_HH + +#include "Screen.hh" + +#include "FbTk/MenuItem.hh" +#include "FbTk/RefCount.hh" +#include "FbTk/Command.hh" + +class AutoShadeModelMenuItem : public FbTk::MenuItem { +public: + AutoShadeModelMenuItem(const char *label, BScreen &screen, + BScreen::AutoShadeModel model, + FbTk::RefCount &cmd): + FbTk::MenuItem(label, cmd), m_screen(screen), m_autoshademodel(model) { + } + bool isEnabled() const { return m_screen.getAutoShadeModel() != m_autoshademodel; } + + void click(int button, int time) { + m_screen.saveAutoShadeModel(m_autoshademodel); + FbTk::MenuItem::click(button, time); + } + +private: + BScreen &m_screen; + BScreen::AutoShadeModel m_autoshademodel; +}; + +#endif // AUTOSHADEMODELMENUITEM_HH Index: src/Gnome.cc =================================================================== --- src/Gnome.cc (Revision 4069) +++ src/Gnome.cc (Arbeitskopie) @@ -362,10 +362,9 @@ #ifdef DEBUG cerr<<"Gnome state: Sticky"<isStuck()) - win->stick(); - } else if (win->isStuck()) win->stick(); + } else + win->unstick(); if (state & WIN_STATE_MINIMIZED) { #ifdef DEBUG @@ -380,10 +379,9 @@ #ifdef DEBUG cerr<<"Gnome state: Shade"<isShaded()) - win->shade(); - } else if (win->isShaded()) win->shade(); + } else + win->unshade(); if (state & WIN_STATE_HIDDEN) { Index: src/Screen.cc =================================================================== --- src/Screen.cc (Revision 4069) +++ src/Screen.cc (Arbeitskopie) @@ -43,6 +43,7 @@ #include "BoolMenuItem.hh" #include "IntResMenuItem.hh" #include "FocusModelMenuItem.hh" +#include "AutoShadeModelMenuItem.hh" // menus #include "FbMenu.hh" @@ -169,15 +170,17 @@ show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"), focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), - 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"), + auto_shade(rm, false, scrname+".autoShade", altscrname+".AutoShade"), + new_windows_autoshadeable(rm, true, scrname+".newWindowsAutoShadeable", altscrname+".NewWindowsAutoShadeable"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"), windowmenufile(rm, "", scrname+".windowMenu", altscrname+".WindowMenu"), focus_model(rm, CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), - follow_model(rm, IGNORE_OTHER_WORKSPACES, scrname+".followModel", altscrname+".followModel"), + follow_model(rm, IGNORE_OTHER_WORKSPACES, scrname+".followModel", altscrname+".FollowModel"), + autoshade_model(rm, NOAUTOSHADE, scrname+".autoShadeModel", altscrname+".AutoShadeModel"), workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"), edge_snap_threshold(rm, 0, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), @@ -1804,6 +1807,24 @@ for (; it != it_end; ++it) menu.insert(it->first, it->second); + + // autoshade entries + // TODO: create nls-entry + FbTk::Menu *autoshade_menu = createMenu("AutoShade"); + + autoshade_menu->insert(new BoolMenuItem("AutoShade", *resource.auto_shade, saverc_cmd)); + autoshade_menu->insert(new BoolMenuItem("New Windows AutoShadeable", *resource.new_windows_autoshadeable, saverc_cmd)); + + FbTk::Menu *over_unfocussed_title_menu = createMenu("Mouse over unfocussed"); + over_unfocussed_title_menu->insert(new AutoShadeModelMenuItem("No Autoshade", *this, BScreen::NOAUTOSHADE, save_and_reconfigure)); + over_unfocussed_title_menu->insert(new AutoShadeModelMenuItem("Sloppy", *this, BScreen::SLOPPYAUTOSHADE, save_and_reconfigure)); + over_unfocussed_title_menu->insert(new AutoShadeModelMenuItem("SemiSloppy", *this, BScreen::SEMISLOPPYAUTOSHADE, save_and_reconfigure)); + + over_unfocussed_title_menu->updateMenu(); + autoshade_menu->insert("Mouse over unfocussed", over_unfocussed_title_menu); + autoshade_menu->updateMenu(); + menu.insert("AutoShade", autoshade_menu); + #define _BOOLITEM(a, b, c, d, e, f) menu.insert(new BoolMenuItem(_FBTEXT(a, b, c, d), e, f)) _BOOLITEM(Configmenu, ImageDithering, @@ -1833,7 +1854,7 @@ _BOOLITEM(Configmenu, ClickRaises, "Click Raises", "Click Raises", *resource.click_raises, saverc_cmd); - + #ifdef HAVE_XRENDER if (FbTk::Transparent::haveRender() || FbTk::Transparent::haveComposite()) { Index: src/Window.cc =================================================================== --- src/Window.cc (Revision 4069) +++ src/Window.cc (Arbeitskopie) @@ -272,9 +272,11 @@ WinClient &m_client; }; -}; +}; // end of anonymous namespace +typedef FbTk::RefCount CommandRef; + int FluxboxWindow::s_num_grabs = 0; FluxboxWindow::FluxboxWindow(WinClient &client, FbWinFrameTheme &tm, @@ -304,6 +306,7 @@ m_old_decoration_mask(0), m_client(&client), m_toggled_decos(false), + m_autoshadeable(client.screen().newWindowsAutoshadeable()), m_shaped(false), m_icon_hidden(false), m_old_pos_x(0), m_old_pos_y(0), @@ -350,7 +353,9 @@ m_labelbuttons.clear(); - m_timer.stop(); + m_autoraise_timer.stop(); + m_autoshade_timer.stop(); + m_autounshade_timer.stop(); // notify die m_diesig.notify(); @@ -437,7 +442,8 @@ decorations.sticky = decorations.shade = decorations.tab = true; - functions.resize = functions.move = functions.iconify = functions.maximize = functions.tabable = true; + functions.resize = functions.move = functions.iconify = + functions.maximize = functions.tabable = true; decorations.close = false; if (m_client->getBlackboxHint() != 0) @@ -458,24 +464,34 @@ m_client->old_bw = wattrib.border_width; m_client->x = wattrib.x; m_client->y = wattrib.y; - m_timer.setTimeout(fluxbox.getAutoRaiseDelay()); - FbTk::RefCount raise_cmd(new FbTk::SimpleCommand(*this, - &FluxboxWindow::raise)); - m_timer.setCommand(raise_cmd); - m_timer.fireOnce(true); + m_autoraise_timer.setTimeout(fluxbox.getAutoRaiseDelay()); + CommandRef raise_cmd(new SimpleCommand(*this, + &FluxboxWindow::raise)); + m_autoraise_timer.setCommand(raise_cmd); + m_autoraise_timer.fireOnce(true); + m_autoshade_timer.setTimeout(fluxbox.getAutoShadeDelay()); + CommandRef shade_cmd(new SimpleCommand(*this, + &FluxboxWindow::shade)); + m_autoshade_timer.setCommand(shade_cmd); + m_autoshade_timer.fireOnce(true); + + m_autounshade_timer.setTimeout(fluxbox.getAutoUnshadeDelay()); + CommandRef unshade_cmd(new SimpleCommand(*this, + &FluxboxWindow::unshade)); + m_autounshade_timer.setCommand(unshade_cmd); + m_autounshade_timer.fireOnce(true); + + + Fluxbox::instance()->saveWindowSearchGroup(frame().window().window(), this); - /**************************************************/ - /* Read state above here, apply state below here. */ - /**************************************************/ - // update transient infomation m_client->updateTransientInfo(); // adjust the window decorations based on transience and window sizes if (m_client->isTransient() && !screen().decorateTransient()) { - decorations.maximize = functions.maximize = false; + decorations.maximize = functions.maximize = m_autoshadeable = false; decorations.handle = false; } @@ -489,14 +505,12 @@ } associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height); - Fluxbox::instance()->attachSignals(*this); // this window is managed, we are now allowed to modify actual state m_initialized = true; - applyDecorations(true); grabButtons(); @@ -566,13 +580,11 @@ } if (stuck) { - stuck = false; stick(); deiconify(); //we're omnipresent and visible } if (shaded) { // start shaded - shaded = false; shade(); } @@ -1634,8 +1646,7 @@ if (isIconic()) deiconify(); - if (isShaded()) - shade(); + unshade(); int head = screen().getHead(frame().window()); int new_x = frame().x(), @@ -1765,56 +1776,75 @@ } } + +void FluxboxWindow::toggleShade() { + if (isShaded()) + unshade(); + else + shade(); +} + void FluxboxWindow::shade() { // we can only shade if we have a titlebar if (!decorations.titlebar) return; - // we're toggling, so if they're equal now, we need to change it - if (isInitialized() && m_frame.isShaded() == shaded) + if (isInitialized() && !m_frame.isShaded()) frame().shade(); - if (shaded) { - shaded = false; - m_blackbox_attrib.flags ^= ATTRIB_SHADED; - m_blackbox_attrib.attrib ^= ATTRIB_SHADED; - - if (isInitialized()) - setState(NormalState, false); - } else { - shaded = true; - m_blackbox_attrib.flags |= ATTRIB_SHADED; - m_blackbox_attrib.attrib |= ATTRIB_SHADED; - // shading is the same as iconic - if (isInitialized()) - setState(IconicState, false); - } - + shaded = true; + m_blackbox_attrib.flags |= ATTRIB_SHADED; + m_blackbox_attrib.attrib |= ATTRIB_SHADED; + // shading is the same as iconic + if (isInitialized()) + setState(IconicState, false); } +void FluxboxWindow::unshade() { -void FluxboxWindow::stick() { + if (isShaded()) + frame().shade(); - if (stuck) { - m_blackbox_attrib.flags ^= ATTRIB_OMNIPRESENT; - m_blackbox_attrib.attrib ^= ATTRIB_OMNIPRESENT; + shaded = false; + m_blackbox_attrib.flags ^= ATTRIB_SHADED; + m_blackbox_attrib.attrib ^= ATTRIB_SHADED; - stuck = false; + if (isInitialized()) + setState(NormalState, false); +} + - } else { - stuck = true; +void FluxboxWindow::toggleSticky() { + if (isStuck()) + unstick(); + else + stick(); +} - m_blackbox_attrib.flags |= ATTRIB_OMNIPRESENT; - m_blackbox_attrib.attrib |= ATTRIB_OMNIPRESENT; +void FluxboxWindow::stick() { + + stuck = true; + m_blackbox_attrib.flags |= ATTRIB_OMNIPRESENT; + m_blackbox_attrib.attrib |= ATTRIB_OMNIPRESENT; + if (isInitialized()) { + setState(m_current_state, false); + // notify since some things consider "stuck" to be a pseudo-workspace + m_workspacesig.notify(); } +} +void FluxboxWindow::unstick() { + + stuck = false; + m_blackbox_attrib.flags ^= ATTRIB_OMNIPRESENT; + m_blackbox_attrib.attrib ^= ATTRIB_OMNIPRESENT; + if (isInitialized()) { setState(m_current_state, false); // notify since some things consider "stuck" to be a pseudo-workspace m_workspacesig.notify(); } - } @@ -2036,11 +2066,22 @@ if ((screen().isSloppyFocus() || screen().isSemiSloppyFocus()) && screen().doAutoRaise()) { if (focused) - m_timer.start(); + m_autoraise_timer.start(); else - m_timer.stop(); + m_autoraise_timer.stop(); } + if (isAutoShadeable() && screen().doAutoShade() && isVisible()) { + if (!focused) { + m_autoshade_timer.start(); + m_autounshade_timer.stop(); + } + else { + m_autounshade_timer.start(); + m_autoshade_timer.stop(); + } + } + // did focus change? notify listeners if (was_focused != focus) m_focussig.notify(); @@ -2913,7 +2954,6 @@ } } - } void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { @@ -2923,10 +2963,11 @@ !isVisible()) { return; } - + WinClient *client = 0; // don't waste our time scanning if we aren't real sloppy focus - if (screen().isSloppyFocus()) { + if (screen().isSloppyFocus() || + (screen().doAutoShade() && isAutoShadeable() && screen().isSloppyAutoShade() && !isFocused())) { // determine if we're in a label button (tab) Client2ButtonMap::iterator it = find_if(m_labelbuttons.begin(), @@ -2936,8 +2977,8 @@ Select2nd()))); if (it != m_labelbuttons.end()) client = (*it).first; - } + if (ev.window == frame().window() || ev.window == m_client->window() || client) { @@ -2964,12 +3005,30 @@ } } + + + bool inside_titlebar = (frame().titlebar() == ev.window || frame().label() == ev.window); + + if (inside_titlebar && screen().doAutoShade() && + (screen().isSloppyAutoShade() || screen().isSemiSloppyAutoShade()) && + isShaded() && !isFocused() && isAutoShadeable()) { + m_autounshade_timer.start(); + m_autoshade_timer.stop(); + } + + if (client && client != m_client && screen().isSloppyAutoShade() && !isFocused()) { + setCurrentClient(*client, false); + } } void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) { - // I hope commenting this out is right - simon 21jul2003 - //if (ev.window == frame().window()) - //installColormap(false); + + if (ev.window == frame().window() && + !isFocused() && !isShaded() && + screen().doAutoShade() && isAutoShadeable()) { + m_autoshade_timer.start(); + m_autounshade_timer.stop(); + } } // TODO: functions should not be affected by decoration @@ -3759,11 +3818,11 @@ CommandRef maximize_vert_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeVertical)); CommandRef maximize_horiz_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeHorizontal)); CommandRef close_cmd(new WindowCmd(*this, &FluxboxWindow::close)); - CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::shade)); + CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::toggleShade)); CommandRef raise_cmd(new WindowCmd(*this, &FluxboxWindow::raise)); CommandRef lower_cmd(new WindowCmd(*this, &FluxboxWindow::lower)); CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus)); - CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); + CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::toggleSticky)); CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); // clear old buttons from frame Index: src/fluxbox.hh =================================================================== --- src/fluxbox.hh (Revision 4069) +++ src/fluxbox.hh (Arbeitskopie) @@ -154,6 +154,8 @@ inline time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } + inline time_t getAutoShadeDelay() const { return *m_rc_auto_shade_delay; } + inline time_t getAutoUnshadeDelay() const { return *m_rc_auto_unshade_delay; } inline unsigned int getCacheLife() const { return *m_rc_cache_life * 60000; } inline unsigned int getCacheMax() const { return *m_rc_cache_max; } @@ -271,6 +273,8 @@ FbTk::Resource m_rc_tabs_attach_area; FbTk::Resource m_rc_cache_life, m_rc_cache_max; FbTk::Resource m_rc_auto_raise_delay; + FbTk::Resource m_rc_auto_shade_delay; + FbTk::Resource m_rc_auto_unshade_delay; FbTk::Resource m_rc_use_mod1; /// temporary!, to disable mod1 for resize/move typedef std::map WinClientMap; Index: src/Remember.hh =================================================================== --- src/Remember.hh (Revision 4069) +++ src/Remember.hh (Arbeitskopie) @@ -57,6 +57,7 @@ inline void forgetJumpworkspace() { jumpworkspace_remember = false; } inline void forgetLayer() { layer_remember = false; } inline void forgetSaveOnClose() { save_on_close_remember = false; } + inline void forgetAutoShade() { autoshade_remember = false; } inline void rememberWorkspace(int ws) { workspace = ws; workspace_remember = true; } @@ -84,8 +85,9 @@ { layer = layernum; layer_remember = true; } inline void rememberSaveOnClose(bool state) { save_on_close = state; save_on_close_remember = true; } + inline void rememberAutoShade(bool state) + { autoshade = state; autoshade_remember = true; } - bool workspace_remember; unsigned int workspace; @@ -129,6 +131,9 @@ bool save_on_close_remember; bool save_on_close; + bool autoshade_remember; + bool autoshade; + bool is_grouped; FluxboxWindow *group; @@ -160,6 +165,7 @@ //REM_TABSTATE, ... external tabs disabled atm REM_WORKSPACE, REM_HEAD, + REM_AUTOSHADE, REM_LASTATTRIB // not actually used }; Index: src/Makefile.am =================================================================== --- src/Makefile.am (Revision 4069) +++ src/Makefile.am (Arbeitskopie) @@ -124,7 +124,7 @@ MenuCreator.hh MenuCreator.cc \ IconMenu.hh IconMenu.cc \ WorkspaceMenu.hh WorkspaceMenu.cc \ - FocusModelMenuItem.hh \ + FocusModelMenuItem.hh AutoShadeModelMenuItem.hh \ ToggleMenu.hh \ HeadArea.hh HeadArea.cc \ Resources.cc \ Index: src/MenuCreator.cc =================================================================== --- src/MenuCreator.cc (Revision 4069) +++ src/MenuCreator.cc (Arbeitskopie) @@ -476,7 +476,7 @@ _FB_USES_NLS; if (type == "shade") { - RefCmd shade_cmd(new WindowCmd(&FluxboxWindow::shade)); + RefCmd shade_cmd(new WindowCmd(&FluxboxWindow::toggleShade)); menu.insert(label.empty()?_FBTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label.c_str(), shade_cmd); } else if (type == "maximize") { RefCmd maximize_cmd(new WindowCmd(&FluxboxWindow::maximizeFull)); @@ -512,10 +512,12 @@ RefCmd raise_cmd(new WindowCmd(&FluxboxWindow::raise)); menu.insert(label.empty()?_FBTEXT(Windowmenu, Raise, "Raise", "Raise the window"):label.c_str(), raise_cmd); } else if (type == "stick") { - RefCmd stick_cmd(new WindowCmd(&FluxboxWindow::stick)); + RefCmd stick_cmd(new WindowCmd(&FluxboxWindow::toggleSticky)); menu.insert(label.empty()?_FBTEXT(Windowmenu, Stick, "Stick", "Stick the window"):label.c_str(), stick_cmd); - } - else if (type == "extramenus") { + } else if (type == "autoshade") { + RefCmd autoshade_cmd(new WindowCmd(&FluxboxWindow::toggleAutoShade)); + menu.insert(label.empty()?"AutoShade":label.c_str(), autoshade_cmd); + } else if (type == "extramenus") { BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber()); BScreen::ExtraMenus::iterator it = screen->extraWindowMenus().begin(); BScreen::ExtraMenus::iterator it_end = screen->extraWindowMenus().end(); Index: src/FbTk/Compose.hh =================================================================== --- src/FbTk/Compose.hh (Revision 4069) +++ src/FbTk/Compose.hh (Arbeitskopie) @@ -1,5 +1,5 @@ // Composer.hh -// Copyright (c) 2003 Henrik Kinnunen (fluxgen at fluxbox dot org) +// Copyright (c) 2003 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), Index: src/ScreenResources.cc =================================================================== --- src/ScreenResources.cc (Revision 4069) +++ src/ScreenResources.cc (Arbeitskopie) @@ -234,6 +234,38 @@ } template<> +std::string FbTk::Resource:: +getString() { + switch (m_value) { + case BScreen::SLOPPYAUTOSHADE: + return string("SloppyAutoShade"); + case BScreen::SEMISLOPPYAUTOSHADE: + return string("SemiSloppyAutoShade"); + case BScreen::NOAUTOSHADE: + default: + return string("NoAutoShade"); + } +} + +template<> +void FbTk::Resource:: +setFromString(char const *strval) { + // auto raise options here for backwards read compatibility + // they are not supported for saving purposes. Nor does the "AutoRaise" + // part actually do anything + if (strcasecmp(strval, "SloppyAutoShade") == 0) + m_value = BScreen::SLOPPYAUTOSHADE; + else if (strcasecmp(strval, "SemiSloppyAutoShade") == 0) + m_value = BScreen::SEMISLOPPYAUTOSHADE; + else if (strcasecmp(strval, "NoAutoShade") == 0) + m_value = BScreen::NOAUTOSHADE; + else + setDefaultValue(); +} + + + +template<> void FbTk::Resource::setDefaultValue() { *(*this) = FbTk::GContext::LINESOLID; } Index: src/FbCommandFactory.cc =================================================================== --- src/FbCommandFactory.cc (Revision 4069) +++ src/FbCommandFactory.cc (Arbeitskopie) @@ -126,6 +126,9 @@ "taketonextworkspace", "taketoprevworkspace", "toggledecor", + "toggleshade", + "togglesticky", + "toggleautoshade", "windowmenu", "workspace", /* NOTE: The following are DEPRECATED and subject to removal */ @@ -307,12 +310,14 @@ return new CurrentWindowCmd(&FluxboxWindow::lowerLayer); else if (command == "close") return new CurrentWindowCmd(&FluxboxWindow::close); - else if (command == "shade" || command == "shadewindow") - return new CurrentWindowCmd(&FluxboxWindow::shade); - else if (command == "stick" || command == "stickwindow") - return new CurrentWindowCmd(&FluxboxWindow::stick); + else if (command == "shade" || command == "shadewindow" || command == "toggleshade") + return new CurrentWindowCmd(&FluxboxWindow::toggleShade); + else if (command == "stick" || command == "stickwindow" || command == "togglesticky") + return new CurrentWindowCmd(&FluxboxWindow::toggleSticky); else if (command == "toggledecor") return new CurrentWindowCmd(&FluxboxWindow::toggleDecoration); + else if (command == "toggleautoshade") + return new CurrentWindowCmd(&FluxboxWindow::toggleAutoShade); else if (command == "sethead") return new SetHeadCmd(atoi(arguments.c_str())); else if (command == "sendtoworkspace") Index: src/fluxbox.cc =================================================================== --- src/fluxbox.cc (Revision 4069) +++ src/fluxbox.cc (Arbeitskopie) @@ -220,6 +220,8 @@ m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), m_rc_auto_raise_delay(m_resourcemanager, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay"), + m_rc_auto_shade_delay(m_resourcemanager, 250, "session.autoShadeDelay", "Session.AutoShadeDelay"), + m_rc_auto_unshade_delay(m_resourcemanager, 250, "session.autoUnshadeDelay", "Session.AutoUnshadeDelay"), m_rc_use_mod1(m_resourcemanager, true, "session.useMod1", "Session.UseMod1"), m_focused_window(0), m_masked_window(0), m_mousescreen(0), Index: src/Remember.cc =================================================================== --- src/Remember.cc (Revision 4069) +++ src/Remember.cc (Arbeitskopie) @@ -138,6 +138,8 @@ Remember::REM_DECOSTATE)); menu->insert(new RememberMenuItem(_FBTEXT(Remember, Shaded, "Shaded", "Remember shaded"), Remember::REM_SHADEDSTATE)); + //TODO: nls entry + menu->insert(new RememberMenuItem("AutoShade", Remember::REM_AUTOSHADE)); menu->insert(new RememberMenuItem(_FBTEXT(Remember, Layer, "Layer", "Remember Layer"), Remember::REM_LAYER)); menu->insert(new RememberMenuItem(_FBTEXT(Remember, SaveOnClose, "Save on close", "Save remembered attributes on close"), @@ -443,6 +445,8 @@ app.rememberJumpworkspace((str_label=="yes")); } else if (str_key == "Close") { app.rememberSaveOnClose((str_label=="yes")); + } else if (str_key == "AutoShade") { + app.rememberAutoShade((str_label=="yes")); } else if (str_key == "end") { return row; } else { @@ -659,6 +663,10 @@ if (a.save_on_close_remember) { apps_file << " [Close]\t{" << ((a.save_on_close)?"yes":"no") << "}" << endl; } + if (a.autoshade_remember) { + apps_file << " [AutoShade]\t{" << (a.autoshade_remember ? "yes" : "no") << "}" << endl; + } + apps_file << "[end]" << endl; } } @@ -706,6 +714,9 @@ case REM_SAVEONCLOSE: return app->save_on_close_remember; break; + case REM_AUTOSHADE: + return app->autoshade_remember; + break; case REM_LASTATTRIB: default: return false; // should never get here @@ -759,6 +770,9 @@ case REM_SAVEONCLOSE: app->rememberSaveOnClose(true); break; + case REM_AUTOSHADE: + app->rememberAutoShade(win->isAutoShadeable()); + break; case REM_LASTATTRIB: default: // nothing @@ -813,6 +827,9 @@ case REM_SAVEONCLOSE: app->forgetSaveOnClose(); break; + case REM_AUTOSHADE: + app->forgetAutoShade(); + break; case REM_LASTATTRIB: default: // nothing @@ -894,7 +911,7 @@ // if inconsistent... if (win.isShaded() && !app->shadedstate || !win.isShaded() && app->shadedstate) - win.shade(); // toggles + win.toggleShade(); // external tabs aren't available atm... //if (app->tabstate_remember) ... @@ -903,7 +920,7 @@ // if inconsistent... if (win.isStuck() && !app->stuckstate || !win.isStuck() && app->stuckstate) - win.stick(); // toggles + win.toggleSticky(); if (app->focushiddenstate_remember) win.setFocusHidden(true); if (app->iconhiddenstate_remember) @@ -912,6 +929,8 @@ if (app->layer_remember) win.moveToLayer(app->layer); + if (app->autoshade_remember) + win.setAutoShadeable(app->autoshade); } void Remember::setupClient(WinClient &winclient) { Index: src/Screen.hh =================================================================== --- src/Screen.hh (Revision 4069) +++ src/Screen.hh (Arbeitskopie) @@ -93,6 +93,9 @@ enum { CYCLEGROUPS = 0x01, CYCLESKIPSTUCK = 0x02, CYCLESKIPSHADED = 0x04, CYCLELINEAR = 0x08, CYCLEDEFAULT = 0x00 }; + // mouse over inactive titlebar + enum AutoShadeModel { NOAUTOSHADE, SLOPPYAUTOSHADE, SEMISLOPPYAUTOSHADE }; + typedef std::vector Icons; typedef std::list FocusedWindows; typedef std::vector Workspaces; @@ -106,24 +109,27 @@ void initWindows(); void initMenus(); - inline bool isSloppyFocus() const { return (*resource.focus_model == SLOPPYFOCUS); } - inline bool isSemiSloppyFocus() const { return (*resource.focus_model == SEMISLOPPYFOCUS); } - inline bool isRootColormapInstalled() const { return root_colormap_installed; } - inline bool isScreenManaged() const { return managed; } - inline bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } - inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } - inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } - inline bool doAutoRaise() const { return *resource.auto_raise; } - inline bool clickRaises() const { return *resource.click_raises; } - inline bool doOpaqueMove() const { return *resource.opaque_move; } - inline bool doFullMax() const { return *resource.full_max; } - inline bool doFocusNew() const { return *resource.focus_new; } - 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 const std::string &windowMenuFilename() const { return *resource.windowmenufile; } - inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); } + bool isSloppyFocus() const { return (*resource.focus_model == SLOPPYFOCUS); } + bool isSemiSloppyFocus() const { return (*resource.focus_model == SEMISLOPPYFOCUS); } + bool isRootColormapInstalled() const { return root_colormap_installed; } + bool isScreenManaged() const { return managed; } + bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } + bool isWorkspaceWarping() const { return *resource.workspace_warping; } + bool isDesktopWheeling() const { return *resource.desktop_wheeling; } + bool doAutoRaise() const { return *resource.auto_raise; } + bool doAutoShade() const { return *resource.auto_shade; } + bool isSloppyAutoShade() const { return *resource.autoshade_model == SLOPPYAUTOSHADE; } + bool isSemiSloppyAutoShade() const { return *resource.autoshade_model == SEMISLOPPYAUTOSHADE; } + bool newWindowsAutoshadeable() const { return *resource.new_windows_autoshadeable; } + bool clickRaises() const { return *resource.click_raises; } + bool doOpaqueMove() const { return *resource.opaque_move; } + bool doFullMax() const { return *resource.full_max; } + bool doFocusNew() const { return *resource.focus_new; } + bool doFocusLast() const { return *resource.focus_last; } + bool doShowWindowPos() const { return *resource.show_window_pos; } + bool decorateTransient() const { return *resource.decorate_transient; } + const std::string &windowMenuFilename() const { return *resource.windowmenufile; } + FbTk::ImageControl &imageControl() { return *m_image_control.get(); } // menus const FbTk::Menu &getRootmenu() const { return *m_rootmenu.get(); } FbTk::Menu &getRootmenu() { return *m_rootmenu.get(); } @@ -135,17 +141,18 @@ ExtraMenus &extraWindowMenus() { return m_extramenus; } const ExtraMenus &extraWindowMenus() const { return m_extramenus; } - inline const std::string &getRootCommand() const { return *resource.rootcommand; } - inline ResizeModel getResizeModel() const { return *resource.resize_model; } - inline FocusModel getFocusModel() const { return *resource.focus_model; } - inline FollowModel getFollowModel() const { return *resource.follow_model; } + const std::string &getRootCommand() const { return *resource.rootcommand; } + ResizeModel getResizeModel() const { return *resource.resize_model; } + FocusModel getFocusModel() const { return *resource.focus_model; } + FollowModel getFollowModel() const { return *resource.follow_model; } + AutoShadeModel getAutoShadeModel() const { return *resource.autoshade_model; } - inline Slit *slit() { return m_slit.get(); } - inline const Slit *slit() const { return m_slit.get(); } + Slit *slit() { return m_slit.get(); } + const Slit *slit() const { return m_slit.get(); } - inline Workspace *getWorkspace(unsigned int w) { return ( w < m_workspaces_list.size() ? m_workspaces_list[w] : 0); } - inline Workspace *currentWorkspace() { return m_current_workspace; } - inline const Workspace *currentWorkspace() const { return m_current_workspace; } + Workspace *getWorkspace(unsigned int w) { return ( w < m_workspaces_list.size() ? m_workspaces_list[w] : 0); } + Workspace *currentWorkspace() { return m_current_workspace; } + const Workspace *currentWorkspace() const { return m_current_workspace; } const FbTk::Menu &getWorkspacemenu() const { return *m_workspacemenu.get(); } FbTk::Menu &getWorkspacemenu() { return *m_workspacemenu.get(); } @@ -164,18 +171,18 @@ /// @return true if dock app was added, else false bool addKdeDockapp(Window win); - inline unsigned int width() const { return rootWindow().width(); } - inline unsigned int height() const { return rootWindow().height(); } - inline int screenNumber() const { return rootWindow().screenNumber(); } + unsigned int width() const { return rootWindow().width(); } + unsigned int height() const { return rootWindow().height(); } + int screenNumber() const { return rootWindow().screenNumber(); } /// @return number of workspaces - inline unsigned int getCount() const { return m_workspaces_list.size(); } + unsigned int getCount() const { return m_workspaces_list.size(); } /// @return number of icons - inline unsigned int getIconCount() const { return m_icon_list.size(); } - inline const Icons &getIconList() const { return m_icon_list; } - inline Icons &getIconList() { return m_icon_list; } - inline const FocusedWindows &getFocusedList() const { return focused_list; } - inline FocusedWindows &getFocusedList() { return focused_list; } + unsigned int getIconCount() const { return m_icon_list.size(); } + const Icons &getIconList() const { return m_icon_list; } + Icons &getIconList() { return m_icon_list; } + const FocusedWindows &getFocusedList() const { return focused_list; } + FocusedWindows &getFocusedList() { return focused_list; } WinClient *getLastFocusedWindow(int workspace = -1); WinClient *getLastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client = 0); const Workspaces &getWorkspacesList() const { return m_workspaces_list; } @@ -216,45 +223,46 @@ void hideWindowMenus(const FluxboxWindow* except= 0); /// @return the resource value of number of workspace - inline int getNumberOfWorkspaces() const { return *resource.workspaces; } + int getNumberOfWorkspaces() const { return *resource.workspaces; } - inline PlacementPolicy getPlacementPolicy() const { return *resource.placement_policy; } - inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; } - inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; } - inline ColumnDirection getColPlacementDirection() const { return *resource.col_direction; } + PlacementPolicy getPlacementPolicy() const { return *resource.placement_policy; } + int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; } + RowDirection getRowPlacementDirection() const { return *resource.row_direction; } + ColumnDirection getColPlacementDirection() const { return *resource.col_direction; } - inline void setRootColormapInstalled(bool r) { root_colormap_installed = r; } - inline void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } - inline void saveFocusModel(FocusModel model) { resource.focus_model = model; } - inline void saveWorkspaces(int w) { *resource.workspaces = w; } + void setRootColormapInstalled(bool r) { root_colormap_installed = r; } + void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } + void saveFocusModel(FocusModel model) { resource.focus_model = model; } + void saveAutoShadeModel(AutoShadeModel model) { resource.autoshade_model = model; } + void saveWorkspaces(int w) { *resource.workspaces = w; } void saveMenu(FbTk::Menu &menu) { m_rootmenu_list.push_back(&menu); } - inline FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); } - inline const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); } - inline MenuTheme &menuTheme() { return *m_menutheme.get(); } - inline const MenuTheme &menuTheme() const { return *m_menutheme.get(); } - inline const RootTheme &rootTheme() const { return *m_root_theme.get(); } - inline WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); } - inline const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); } + FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); } + const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); } + MenuTheme &menuTheme() { return *m_menutheme.get(); } + const MenuTheme &menuTheme() const { return *m_menutheme.get(); } + const RootTheme &rootTheme() const { return *m_root_theme.get(); } + WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); } + const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); } - inline FbRootWindow &rootWindow() { return m_root_window; } - inline const FbRootWindow &rootWindow() const { return m_root_window; } + FbRootWindow &rootWindow() { return m_root_window; } + const FbRootWindow &rootWindow() const { return m_root_window; } - inline FbTk::MultLayers &layerManager() { return m_layermanager; } - inline const FbTk::MultLayers &layerManager() const { return m_layermanager; } - inline FbTk::ResourceManager &resourceManager() { return m_resource_manager; } - inline const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; } - inline const std::string &name() const { return m_name; } - inline const std::string &altName() const { return m_altname; } - inline bool isShuttingdown() const { return m_shutdown; } + FbTk::MultLayers &layerManager() { return m_layermanager; } + const FbTk::MultLayers &layerManager() const { return m_layermanager; } + FbTk::ResourceManager &resourceManager() { return m_resource_manager; } + const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; } + const std::string &name() const { return m_name; } + const std::string &altName() const { return m_altname; } + bool isShuttingdown() const { return m_shutdown; } int addWorkspace(); int removeLastWorkspace(); // scroll workspaces - inline void nextWorkspace() { nextWorkspace(1); } - inline void prevWorkspace() { prevWorkspace(1); } + void nextWorkspace() { nextWorkspace(1); } + void prevWorkspace() { prevWorkspace(1); } void nextWorkspace(int delta); void prevWorkspace(int delta); void rightWorkspace(int delta); @@ -278,8 +286,8 @@ bool changeworkspace=true); void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); - inline void prevFocus() { prevFocus(0); } - inline void nextFocus() { nextFocus(0); } + void prevFocus() { prevFocus(0); } + void nextFocus() { nextFocus(0); } void prevFocus(int options); void nextFocus(int options); void raiseFocus(); @@ -309,8 +317,8 @@ void updateSize(); // Xinerama-related functions - inline bool hasXinerama() const { return m_xinerama_avail; } - inline int numHeads() const { return m_xinerama_num_heads; } + bool hasXinerama() const { return m_xinerama_avail; } + int numHeads() const { return m_xinerama_num_heads; } void initXinerama(); @@ -448,12 +456,13 @@ sloppy_window_grouping, workspace_warping, desktop_wheeling, show_window_pos, focus_last, focus_new, - antialias, auto_raise, click_raises, decorate_transient; + auto_raise, click_raises, decorate_transient, auto_shade, new_windows_autoshadeable; FbTk::Resource rootcommand; FbTk::Resource resize_model; FbTk::Resource windowmenufile; FbTk::Resource focus_model; FbTk::Resource follow_model; + FbTk::Resource autoshade_model; bool ordered_dither; FbTk::Resource workspaces, edge_snap_threshold, focused_alpha, unfocused_alpha, menu_alpha, menu_delay, menu_delay_close; Index: src/FbWinFrame.cc =================================================================== --- src/FbWinFrame.cc (Revision 4069) +++ src/FbWinFrame.cc (Arbeitskopie) @@ -53,7 +53,7 @@ m_theme(theme), m_imagectrl(imgctrl), m_window(theme.screenNum(), x, y, width, height, ButtonPressMask | ButtonReleaseMask | - ButtonMotionMask | EnterWindowMask, true), + ButtonMotionMask | LeaveWindowMask | EnterWindowMask, true), m_titlebar(m_window, 0, 0, 100, 16, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | ExposureMask | @@ -428,8 +428,8 @@ win.setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask); - m_window.setEventMask(ButtonPressMask | ButtonReleaseMask | - ButtonMotionMask | EnterWindowMask | SubstructureRedirectMask); + m_window.setEventMask(ButtonPressMask | ButtonReleaseMask | + ButtonMotionMask | EnterWindowMask | LeaveWindowMask | SubstructureRedirectMask); XFlush(win.display()); Index: src/Window.hh =================================================================== --- src/Window.hh (Revision 4069) +++ src/Window.hh (Arbeitskopie) @@ -206,10 +206,15 @@ void maximizeVertical(); /// maximizes the window fully void maximizeFull(); - /// toggles shade + /// shade functions + void toggleShade(); void shade(); + void unshade(); /// toggles sticky + void toggleSticky(); void stick(); + void unstick(); + void raise(); void lower(); void tempRaise(); @@ -277,42 +282,44 @@ unsigned int getWmState() const { return m_current_state; } // whether this window can be tabbed with other windows, // and others tabbed with it - inline void setTabable(bool tabable) { functions.tabable = tabable; } - inline bool isTabable() { return functions.tabable; } - inline void setMovable(bool movable) { functions.move = movable; } - inline void setResizable(bool resizable) { functions.resize = resizable; } - - inline bool isFocusHidden() const { return (m_blackbox_attrib.flags & ATTRIB_HIDDEN); } - inline bool isIconHidden() const { return m_icon_hidden; } - inline bool isManaged() const { return m_initialized; } - inline bool isInitialized() const { return m_initialized; } - inline bool isFocused() const { return focused; } + void setTabable(bool tabable) { functions.tabable = tabable; } + void setMovable(bool movable) { functions.move = movable; } + void setResizable(bool resizable) { functions.resize = resizable; } + void setAutoShadeable(bool autoshadeable) { m_autoshadeable = autoshadeable; } + void toggleAutoShade() { setAutoShadeable(isAutoShadeable() ? false : true); } + bool isTabable() { return functions.tabable; } + bool isFocusHidden() const { return (m_blackbox_attrib.flags & ATTRIB_HIDDEN); } + bool isIconHidden() const { return m_icon_hidden; } + bool isManaged() const { return m_initialized; } + bool isInitialized() const { return m_initialized; } + bool isFocused() const { return focused; } bool isVisible() const; - inline bool isIconic() const { return iconic; } - inline bool isShaded() const { return shaded; } - inline bool isFullscreen() const { return fullscreen; } - inline bool isMaximized() const { return maximized == MAX_FULL; } - inline bool isIconifiable() const { return functions.iconify; } - inline bool isMaximizable() const { return functions.maximize; } - inline bool isResizable() const { return functions.resize; } - inline bool isClosable() const { return functions.close; } - inline bool isStuck() const { return stuck; } - inline bool hasTitlebar() const { return decorations.titlebar; } - inline bool isMoving() const { return moving; } - inline bool isResizing() const { return resizing; } + bool isIconic() const { return iconic; } + bool isShaded() const { return shaded; } + bool isFullscreen() const { return fullscreen; } + bool isMaximized() const { return maximized == MAX_FULL; } + bool isIconifiable() const { return functions.iconify; } + bool isMaximizable() const { return functions.maximize; } + bool isResizable() const { return functions.resize; } + bool isClosable() const { return functions.close; } + bool isAutoShadeable() const { return m_autoshadeable; } + bool isStuck() const { return stuck; } + bool hasTitlebar() const { return decorations.titlebar; } + bool isMoving() const { return moving; } + bool isResizing() const { return resizing; } bool isGroupable() const; - inline int numClients() const { return m_clientlist.size(); } - inline bool empty() const { return m_clientlist.empty(); } - inline ClientList &clientList() { return m_clientlist; } - inline const ClientList &clientList() const { return m_clientlist; } - inline WinClient &winClient() { return *m_client; } - inline const WinClient &winClient() const { return *m_client; } + int numClients() const { return m_clientlist.size(); } + bool empty() const { return m_clientlist.empty(); } + ClientList &clientList() { return m_clientlist; } + const ClientList &clientList() const { return m_clientlist; } + WinClient &winClient() { return *m_client; } + const WinClient &winClient() const { return *m_client; } - inline const BScreen &screen() const { return m_screen; } - inline BScreen &screen() { return m_screen; } + const BScreen &screen() const { return m_screen; } + BScreen &screen() { return m_screen; } - inline const FbTk::XLayerItem &layerItem() const { return m_layeritem; } - inline FbTk::XLayerItem &layerItem() { return m_layeritem; } + const FbTk::XLayerItem &layerItem() const { return m_layeritem; } + FbTk::XLayerItem &layerItem() { return m_layeritem; } Window clientWindow() const; @@ -327,10 +334,10 @@ const std::string &title() const; const std::string &iconTitle() const; - inline int x() const { return frame().x(); } - inline int y() const { return frame().y(); } - inline unsigned int width() const { return frame().width(); } - inline unsigned int height() const { return frame().height(); } + int x() const { return frame().x(); } + int y() const { return frame().y(); } + unsigned int width() const { return frame().width(); } + unsigned int height() const { return frame().height(); } unsigned int workspaceNumber() const { return m_workspace_number; } @@ -343,8 +350,8 @@ bool isLowerTab() const; int initialState() const; - inline FbWinFrame &frame() { return m_frame; } - inline const FbWinFrame &frame() const { return m_frame; } + FbWinFrame &frame() { return m_frame; } + const FbWinFrame &frame() const { return m_frame; } /** @name signals @@ -456,7 +463,9 @@ WinClient *m_attaching_tab; BScreen &m_screen; /// screen on which this window exist - FbTk::Timer m_timer; + FbTk::Timer m_autoraise_timer; + FbTk::Timer m_autoshade_timer; + FbTk::Timer m_autounshade_timer; Display *display; /// display connection BlackboxAttributes m_blackbox_attrib; @@ -487,6 +496,7 @@ } decorations; bool m_toggled_decos; + bool m_autoshadeable; struct _functions { bool resize, move, iconify, maximize, close, tabable;