diff options
author | akir <akir> | 2004-10-18 01:24:24 (GMT) |
---|---|---|
committer | akir <akir> | 2004-10-18 01:24:24 (GMT) |
commit | 2760b03b2e0a7ee93e4ce70daf73faa609076dff (patch) | |
tree | ec5b2a3312ed65016ecfb1922cc9f5183a7d0d75 /src | |
parent | 65ce32a28e59140f7ad9e599518fabc14712010d (diff) | |
download | fluxbox_lack-2760b03b2e0a7ee93e4ce70daf73faa609076dff.zip fluxbox_lack-2760b03b2e0a7ee93e4ce70daf73faa609076dff.tar.bz2 |
cosmetic changes, added ResizeModel to ScreenRessources
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/Screen.hh | 9 | ||||
-rw-r--r-- | src/ScreenResources.cc | 24 | ||||
-rw-r--r-- | src/Window.cc | 4 |
4 files changed, 33 insertions, 8 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 9a8d2a0..2d5cf5e 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.295 2004/10/16 22:18:56 akir Exp $ | 25 | // $Id: Screen.cc,v 1.296 2004/10/18 01:24:23 akir Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -172,7 +172,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | |||
172 | click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), | 172 | click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), |
173 | decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), | 173 | decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), |
174 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), | 174 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), |
175 | resizemode(rm, "", scrname+".resizeMode", altscrname+".ResizeMode"), | 175 | resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"), |
176 | windowmenufile(rm, "", scrname+".windowMenu", altscrname+".WindowMenu"), | 176 | windowmenufile(rm, "", scrname+".windowMenu", altscrname+".WindowMenu"), |
177 | focus_model(rm, CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), | 177 | focus_model(rm, CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), |
178 | follow_model(rm, IGNORE_OTHER_WORKSPACES, scrname+".followModel", altscrname+".followModel"), | 178 | follow_model(rm, IGNORE_OTHER_WORKSPACES, scrname+".followModel", altscrname+".followModel"), |
diff --git a/src/Screen.hh b/src/Screen.hh index 4788fff..e861386 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.hh,v 1.148 2004/10/16 22:18:56 akir Exp $ | 25 | // $Id: Screen.hh,v 1.149 2004/10/18 01:24:23 akir Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -77,7 +77,8 @@ class Subject; | |||
77 | */ | 77 | */ |
78 | class BScreen : public FbTk::Observer, private FbTk::NotCopyable { | 78 | class BScreen : public FbTk::Observer, private FbTk::NotCopyable { |
79 | public: | 79 | public: |
80 | enum FocusModel { SLOPPYFOCUS=0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; | 80 | enum ResizeModel { BOTTOMRESIZE = 0, QUADRANTRESIZE, DEFAULTRESIZE = BOTTOMRESIZE }; |
81 | enum FocusModel { SLOPPYFOCUS = 0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; | ||
81 | enum FollowModel { ///< a window becomes active / focussed on a different workspace | 82 | enum FollowModel { ///< a window becomes active / focussed on a different workspace |
82 | IGNORE_OTHER_WORKSPACES = 0, ///< who cares? | 83 | IGNORE_OTHER_WORKSPACES = 0, ///< who cares? |
83 | FOLLOW_ACTIVE_WINDOW, ///< go to that workspace | 84 | FOLLOW_ACTIVE_WINDOW, ///< go to that workspace |
@@ -128,7 +129,7 @@ public: | |||
128 | FbTk::Menu &configMenu() { return *m_configmenu.get(); } | 129 | FbTk::Menu &configMenu() { return *m_configmenu.get(); } |
129 | 130 | ||
130 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } | 131 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } |
131 | inline const std::string &getResizeMode() const { return *resource.resizemode; } | 132 | inline ResizeModel getResizeModel() const { return *resource.resize_model; } |
132 | inline FocusModel getFocusModel() const { return *resource.focus_model; } | 133 | inline FocusModel getFocusModel() const { return *resource.focus_model; } |
133 | inline FollowModel getFollowModel() const { return *resource.follow_model; } | 134 | inline FollowModel getFollowModel() const { return *resource.follow_model; } |
134 | 135 | ||
@@ -437,7 +438,7 @@ private: | |||
437 | focus_last, focus_new, | 438 | focus_last, focus_new, |
438 | antialias, auto_raise, click_raises, decorate_transient; | 439 | antialias, auto_raise, click_raises, decorate_transient; |
439 | FbTk::Resource<std::string> rootcommand; | 440 | FbTk::Resource<std::string> rootcommand; |
440 | FbTk::Resource<std::string> resizemode; | 441 | FbTk::Resource<ResizeModel> resize_model; |
441 | FbTk::Resource<std::string> windowmenufile; | 442 | FbTk::Resource<std::string> windowmenufile; |
442 | FbTk::Resource<FocusModel> focus_model; | 443 | FbTk::Resource<FocusModel> focus_model; |
443 | FbTk::Resource<FollowModel> follow_model; | 444 | FbTk::Resource<FollowModel> follow_model; |
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc index 70179b6..3d153e6 100644 --- a/src/ScreenResources.cc +++ b/src/ScreenResources.cc | |||
@@ -124,6 +124,30 @@ void FbTk::Resource<FbTk::MenuTheme::MenuMode>::setFromString(const char *str) { | |||
124 | } | 124 | } |
125 | 125 | ||
126 | template<> | 126 | template<> |
127 | std::string FbTk::Resource<BScreen::ResizeModel>:: | ||
128 | getString() { | ||
129 | switch (m_value) { | ||
130 | case BScreen::QUADRANTRESIZE: | ||
131 | return std::string("Quadrant"); | ||
132 | case BScreen::BOTTOMRESIZE: | ||
133 | return std::string("Bottom"); | ||
134 | }; | ||
135 | |||
136 | return std::string("Default"); | ||
137 | } | ||
138 | |||
139 | template<> | ||
140 | void FbTk::Resource<BScreen::ResizeModel>:: | ||
141 | setFromString(char const *strval) { | ||
142 | if (strcasecmp(strval, "Bottom") == 0) { | ||
143 | m_value = BScreen::BOTTOMRESIZE; | ||
144 | } else if (strcasecmp(strval, "Quadrant") == 0) { | ||
145 | m_value = BScreen::QUADRANTRESIZE; | ||
146 | } else | ||
147 | m_value = BScreen::DEFAULTRESIZE; | ||
148 | } | ||
149 | |||
150 | template<> | ||
127 | std::string FbTk::Resource<BScreen::FocusModel>:: | 151 | std::string FbTk::Resource<BScreen::FocusModel>:: |
128 | getString() { | 152 | getString() { |
129 | switch (m_value) { | 153 | switch (m_value) { |
diff --git a/src/Window.cc b/src/Window.cc index 26fd542..18570a5 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.302 2004/10/17 21:40:15 akir Exp $ | 25 | // $Id: Window.cc,v 1.303 2004/10/18 01:24:24 akir Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2585,7 +2585,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2585 | m_resize_corner = RIGHTBOTTOM; | 2585 | m_resize_corner = RIGHTBOTTOM; |
2586 | else if (me.window == frame().gripLeft()) | 2586 | else if (me.window == frame().gripLeft()) |
2587 | m_resize_corner = LEFTBOTTOM; | 2587 | m_resize_corner = LEFTBOTTOM; |
2588 | else if (screen().getResizeMode() != "quadrant") | 2588 | else if (screen().getResizeModel() != BScreen::QUADRANTRESIZE) |
2589 | m_resize_corner = RIGHTBOTTOM; | 2589 | m_resize_corner = RIGHTBOTTOM; |
2590 | else if (me.x < cx) | 2590 | else if (me.x < cx) |
2591 | m_resize_corner = (me.y < cy) ? LEFTTOP : LEFTBOTTOM; | 2591 | m_resize_corner = (me.y < cy) ? LEFTTOP : LEFTBOTTOM; |