aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-22 14:17:17 (GMT)
committerfluxgen <fluxgen>2003-06-22 14:17:17 (GMT)
commitbf81d4e6c31546bf92ea160055bf6e2fdc8225f5 (patch)
tree3dca0e7506142ea54845a857a6d737e7ade297ba
parent99150507d8732b74ea3dda3b37f03d613005c9f1 (diff)
downloadfluxbox-bf81d4e6c31546bf92ea160055bf6e2fdc8225f5.zip
fluxbox-bf81d4e6c31546bf92ea160055bf6e2fdc8225f5.tar.bz2
removing strut when maximize over is set
-rw-r--r--src/Slit.cc27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index a219fd8..c349230 100644
--- a/src/Slit.cc
+++ b/src/Slit.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: Slit.cc,v 1.63 2003/06/22 12:31:37 fluxgen Exp $ 25// $Id: Slit.cc,v 1.64 2003/06/22 14:17:17 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -39,10 +39,11 @@
39#include "Screen.hh" 39#include "Screen.hh"
40#include "ImageControl.hh" 40#include "ImageControl.hh"
41#include "RefCount.hh" 41#include "RefCount.hh"
42#include "SimpleCommand.hh"
43#include "BoolMenuItem.hh" 42#include "BoolMenuItem.hh"
44#include "EventManager.hh" 43#include "EventManager.hh"
44#include "SimpleCommand.hh"
45#include "MacroCommand.hh" 45#include "MacroCommand.hh"
46#include "FbCommands.hh"
46#include "LayerMenu.hh" 47#include "LayerMenu.hh"
47#include "fluxbox.hh" 48#include "fluxbox.hh"
48#include "XLayer.hh" 49#include "XLayer.hh"
@@ -78,6 +79,9 @@ public:
78 explicit SlitClientMenuItem(SlitClient &client, FbTk::RefCount<FbTk::Command> &cmd): 79 explicit SlitClientMenuItem(SlitClient &client, FbTk::RefCount<FbTk::Command> &cmd):
79 FbTk::MenuItem(client.matchName().c_str(), cmd), m_client(client) { 80 FbTk::MenuItem(client.matchName().c_str(), cmd), m_client(client) {
80 FbTk::MenuItem::setSelected(client.visible()); 81 FbTk::MenuItem::setSelected(client.visible());
82 // save resources as default click action
83 FbTk::RefCount<FbTk::Command> save_rc(new FbCommands::SaveResources());
84 setCommand(save_rc);
81 } 85 }
82 const std::string &label() const { 86 const std::string &label() const {
83 return m_client.matchName(); 87 return m_client.matchName();
@@ -88,7 +92,6 @@ public:
88 void click(int button, int time) { 92 void click(int button, int time) {
89 m_client.setVisible(!m_client.visible()); 93 m_client.setVisible(!m_client.visible());
90 FbTk::MenuItem::click(button, time); 94 FbTk::MenuItem::click(button, time);
91 Fluxbox::instance()->save_rc();
92 } 95 }
93private: 96private:
94 SlitClient &m_client; 97 SlitClient &m_client;
@@ -258,10 +261,16 @@ void Slit::clearStrut() {
258} 261}
259 262
260void Slit::updateStrut() { 263void Slit::updateStrut() {
264 bool had_strut = m_strut ? true : false;
261 clearStrut(); 265 clearStrut();
262 // no need for area if we're autohiding 266 // no need for area if we're autohiding or set maximize over
263 if (doAutoHide()) 267 if (doAutoHide() || *m_rc_maximize_over) {
268 // update screen area if we had a strut before
269 if (had_strut)
270 screen().updateAvailableWorkspaceArea();
264 return; 271 return;
272 }
273
265 274
266 int left = 0, right = 0, top = 0, bottom = 0; 275 int left = 0, right = 0, top = 0, bottom = 0;
267 switch (placement()) { 276 switch (placement()) {
@@ -532,6 +541,7 @@ void Slit::removeClient(Window w, bool remap) {
532 541
533 542
534void Slit::reconfigure() { 543void Slit::reconfigure() {
544
535 m_transp->setAlpha(*m_rc_alpha); 545 m_transp->setAlpha(*m_rc_alpha);
536 546
537 frame.width = 0; 547 frame.width = 0;
@@ -686,7 +696,6 @@ void Slit::reconfigure() {
686 updateClientmenu(); 696 updateClientmenu();
687 updateStrut(); 697 updateStrut();
688 698
689
690} 699}
691 700
692 701
@@ -809,9 +818,6 @@ void Slit::reposition() {
809 frame.window.moveResize(frame.x, frame.y, 818 frame.window.moveResize(frame.x, frame.y,
810 frame.width, frame.height); 819 frame.width, frame.height);
811 } 820 }
812#ifdef DEBUG
813 cerr<<__FILE__<<"("<<__FUNCTION__<<"): frame("<<dec<<frame.x<<", "<<frame.y<<", "<<frame.width<<", "<<frame.height<<")"<<endl;
814#endif // DEBUG
815 821
816} 822}
817 823
@@ -1101,8 +1107,7 @@ void Slit::setupMenu() {
1101 1107
1102 FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand(); 1108 FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand();
1103 FbTk::MacroCommand *s_a_reconf_slit_macro = new FbTk::MacroCommand(); 1109 FbTk::MacroCommand *s_a_reconf_slit_macro = new FbTk::MacroCommand();
1104 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(*Fluxbox::instance(), 1110 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
1105 &Fluxbox::save_rc));
1106 FbTk::RefCount<FbTk::Command> reconf_cmd(new FbCommands::ReconfigureFluxboxCmd()); 1111 FbTk::RefCount<FbTk::Command> reconf_cmd(new FbCommands::ReconfigureFluxboxCmd());
1107 FbTk::RefCount<FbTk::Command> reconf_slit_cmd(new FbTk::SimpleCommand<Slit>(*this, &Slit::reconfigure)); 1112 FbTk::RefCount<FbTk::Command> reconf_slit_cmd(new FbTk::SimpleCommand<Slit>(*this, &Slit::reconfigure));
1108 1113