all repos — fluxbox @ 2760b03b2e0a7ee93e4ce70daf73faa609076dff

custom fork of the fluxbox windowmanager

cosmetic changes, added ResizeModel to ScreenRessources
akir akir
commit

2760b03b2e0a7ee93e4ce70daf73faa609076dff

parent

65ce32a28e59140f7ad9e599518fabc14712010d

4 files changed, 33 insertions(+), 8 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // 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: Screen.cc,v 1.295 2004/10/16 22:18:56 akir Exp $ +// $Id: Screen.cc,v 1.296 2004/10/18 01:24:23 akir Exp $ #include "Screen.hh"

@@ -172,7 +172,7 @@ 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"), + 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"),
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // 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: Screen.hh,v 1.148 2004/10/16 22:18:56 akir Exp $ +// $Id: Screen.hh,v 1.149 2004/10/18 01:24:23 akir Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -77,7 +77,8 @@ Create workspaces, handles switching between workspaces and windows

*/ class BScreen : public FbTk::Observer, private FbTk::NotCopyable { public: - enum FocusModel { SLOPPYFOCUS=0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; + enum ResizeModel { BOTTOMRESIZE = 0, QUADRANTRESIZE, DEFAULTRESIZE = BOTTOMRESIZE }; + enum FocusModel { SLOPPYFOCUS = 0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; enum FollowModel { ///< a window becomes active / focussed on a different workspace IGNORE_OTHER_WORKSPACES = 0, ///< who cares? FOLLOW_ACTIVE_WINDOW, ///< go to that workspace

@@ -128,7 +129,7 @@ const FbTk::Menu &configMenu() const { return *m_configmenu.get(); }

FbTk::Menu &configMenu() { return *m_configmenu.get(); } inline const std::string &getRootCommand() const { return *resource.rootcommand; } - inline const std::string &getResizeMode() const { return *resource.resizemode; } + inline ResizeModel getResizeModel() const { return *resource.resize_model; } inline FocusModel getFocusModel() const { return *resource.focus_model; } inline FollowModel getFollowModel() const { return *resource.follow_model; }

@@ -437,7 +438,7 @@ desktop_wheeling, show_window_pos,

focus_last, focus_new, antialias, auto_raise, click_raises, decorate_transient; FbTk::Resource<std::string> rootcommand; - FbTk::Resource<std::string> resizemode; + FbTk::Resource<ResizeModel> resize_model; FbTk::Resource<std::string> windowmenufile; FbTk::Resource<FocusModel> focus_model; FbTk::Resource<FollowModel> follow_model;
M src/ScreenResources.ccsrc/ScreenResources.cc

@@ -124,6 +124,30 @@ setDefaultValue();

} template<> +std::string FbTk::Resource<BScreen::ResizeModel>:: +getString() { + switch (m_value) { + case BScreen::QUADRANTRESIZE: + return std::string("Quadrant"); + case BScreen::BOTTOMRESIZE: + return std::string("Bottom"); + }; + + return std::string("Default"); +} + +template<> +void FbTk::Resource<BScreen::ResizeModel>:: +setFromString(char const *strval) { + if (strcasecmp(strval, "Bottom") == 0) { + m_value = BScreen::BOTTOMRESIZE; + } else if (strcasecmp(strval, "Quadrant") == 0) { + m_value = BScreen::QUADRANTRESIZE; + } else + m_value = BScreen::DEFAULTRESIZE; +} + +template<> std::string FbTk::Resource<BScreen::FocusModel>:: getString() { switch (m_value) {
M src/Window.ccsrc/Window.cc

@@ -22,7 +22,7 @@ // 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: Window.cc,v 1.302 2004/10/17 21:40:15 akir Exp $ +// $Id: Window.cc,v 1.303 2004/10/18 01:24:24 akir Exp $ #include "Window.hh"

@@ -2585,7 +2585,7 @@ if (me.window == frame().gripRight())

m_resize_corner = RIGHTBOTTOM; else if (me.window == frame().gripLeft()) m_resize_corner = LEFTBOTTOM; - else if (screen().getResizeMode() != "quadrant") + else if (screen().getResizeModel() != BScreen::QUADRANTRESIZE) m_resize_corner = RIGHTBOTTOM; else if (me.x < cx) m_resize_corner = (me.y < cy) ? LEFTTOP : LEFTBOTTOM;