diff options
author | fluxgen <fluxgen> | 2004-02-20 09:07:27 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-02-20 09:07:27 (GMT) |
commit | 3c78d753c0c1b293d20ad52e38586929bf47f13e (patch) | |
tree | fc146deff9fe5ebb0afb51f9882f17f54a45336c /src/Remember.cc | |
parent | 1e405808fb3cba1b19d6af9697312a6f4d8ec3ba (diff) | |
download | fluxbox-3c78d753c0c1b293d20ad52e38586929bf47f13e.zip fluxbox-3c78d753c0c1b293d20ad52e38586929bf47f13e.tar.bz2 |
fixed focus issues with remember hidden, patch from Mathias Gumz
Diffstat (limited to 'src/Remember.cc')
-rw-r--r-- | src/Remember.cc | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/src/Remember.cc b/src/Remember.cc index 5f1787f..630428b 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -21,7 +21,7 @@ | |||
21 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | // DEALINGS IN THE SOFTWARE. | 22 | // DEALINGS IN THE SOFTWARE. |
23 | 23 | ||
24 | // $Id: Remember.cc,v 1.34 2004/02/16 10:25:33 fluxgen Exp $ | 24 | // $Id: Remember.cc,v 1.35 2004/02/20 09:05:38 fluxgen Exp $ |
25 | 25 | ||
26 | #include "Remember.hh" | 26 | #include "Remember.hh" |
27 | #include "ClientPattern.hh" | 27 | #include "ClientPattern.hh" |
@@ -210,7 +210,8 @@ Application::Application(bool grouped) | |||
210 | { | 210 | { |
211 | decostate_remember = | 211 | decostate_remember = |
212 | dimensions_remember = | 212 | dimensions_remember = |
213 | hiddenstate_remember = | 213 | focushiddenstate_remember = |
214 | iconhiddenstate_remember = | ||
214 | jumpworkspace_remember = | 215 | jumpworkspace_remember = |
215 | layer_remember = | 216 | layer_remember = |
216 | position_remember = | 217 | position_remember = |
@@ -364,8 +365,13 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) { | |||
364 | app.rememberShadedstate((str_label=="yes")); | 365 | app.rememberShadedstate((str_label=="yes")); |
365 | } else if (str_key == "Tab") { | 366 | } else if (str_key == "Tab") { |
366 | app.rememberTabstate((str_label=="yes")); | 367 | app.rememberTabstate((str_label=="yes")); |
368 | } else if (str_key == "FocusHidden") { | ||
369 | app.rememberFocusHiddenstate((str_label=="yes")); | ||
370 | } else if (str_key == "IconHidden") { | ||
371 | app.rememberIconHiddenstate((str_label=="yes")); | ||
367 | } else if (str_key == "Hidden") { | 372 | } else if (str_key == "Hidden") { |
368 | app.rememberHiddenstate((str_label=="yes")); | 373 | app.rememberIconHiddenstate((str_label=="yes")); |
374 | app.rememberFocusHiddenstate((str_label=="yes")); | ||
369 | } else if (str_key == "Deco") { | 375 | } else if (str_key == "Deco") { |
370 | if (str_label == "NONE") { | 376 | if (str_label == "NONE") { |
371 | app.rememberDecostate((unsigned int) 0); | 377 | app.rememberDecostate((unsigned int) 0); |
@@ -548,9 +554,6 @@ void Remember::save() { | |||
548 | if (a.tabstate_remember) { | 554 | if (a.tabstate_remember) { |
549 | apps_file << " [Tab]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; | 555 | apps_file << " [Tab]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; |
550 | } | 556 | } |
551 | if (a.hiddenstate_remember) { | ||
552 | apps_file << " [Hidden]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; | ||
553 | } | ||
554 | if (a.decostate_remember) { | 557 | if (a.decostate_remember) { |
555 | switch (a.decostate) { | 558 | switch (a.decostate) { |
556 | case (0) : | 559 | case (0) : |
@@ -578,6 +581,17 @@ void Remember::save() { | |||
578 | break; | 581 | break; |
579 | } | 582 | } |
580 | } | 583 | } |
584 | |||
585 | if (a.focushiddenstate_remember || a.iconhiddenstate_remember) { | ||
586 | if (a.focushiddenstate_remember && a.iconhiddenstate_remember && | ||
587 | a.focushiddenstate && a.iconhiddenstate) | ||
588 | apps_file << " [Hidden]\t{" << ((a.focushiddenstate)?"yes":"no") << "}" << endl; | ||
589 | else if (a.focushiddenstate_remember) { | ||
590 | apps_file << " [FocusHidden]\t{" << ((a.focushiddenstate)?"yes":"no") << "}" << endl; | ||
591 | } else if (a.iconhiddenstate_remember) { | ||
592 | apps_file << " [IconHidden]\t{" << ((a.iconhiddenstate)?"yes":"no") << "}" << endl; | ||
593 | } | ||
594 | } | ||
581 | if (a.stuckstate_remember) { | 595 | if (a.stuckstate_remember) { |
582 | apps_file << " [Sticky]\t{" << ((a.stuckstate)?"yes":"no") << "}" << endl; | 596 | apps_file << " [Sticky]\t{" << ((a.stuckstate)?"yes":"no") << "}" << endl; |
583 | } | 597 | } |
@@ -607,8 +621,11 @@ bool Remember::isRemembered(WinClient &winclient, Attribute attrib) { | |||
607 | case REM_POSITION: | 621 | case REM_POSITION: |
608 | return app->position_remember; | 622 | return app->position_remember; |
609 | break; | 623 | break; |
610 | case REM_HIDDENSTATE: | 624 | case REM_FOCUSHIDDENSTATE: |
611 | return app->hiddenstate_remember; | 625 | return app->focushiddenstate_remember; |
626 | break; | ||
627 | case REM_ICONHIDDENSTATE: | ||
628 | return app->iconhiddenstate_remember; | ||
612 | break; | 629 | break; |
613 | case REM_STUCKSTATE: | 630 | case REM_STUCKSTATE: |
614 | return app->stuckstate_remember; | 631 | return app->stuckstate_remember; |
@@ -655,8 +672,11 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) { | |||
655 | case REM_POSITION: | 672 | case REM_POSITION: |
656 | app->rememberPosition(win->x(), win->y()); | 673 | app->rememberPosition(win->x(), win->y()); |
657 | break; | 674 | break; |
658 | case REM_HIDDENSTATE: | 675 | case REM_FOCUSHIDDENSTATE: |
659 | app->rememberHiddenstate(win->isHidden()); | 676 | app->rememberFocusHiddenstate(win->isFocusHidden()); |
677 | break; | ||
678 | case REM_ICONHIDDENSTATE: | ||
679 | app->rememberIconHiddenstate(win->isIconHidden()); | ||
660 | break; | 680 | break; |
661 | case REM_SHADEDSTATE: | 681 | case REM_SHADEDSTATE: |
662 | app->rememberShadedstate(win->isShaded()); | 682 | app->rememberShadedstate(win->isShaded()); |
@@ -703,8 +723,11 @@ void Remember::forgetAttrib(WinClient &winclient, Attribute attrib) { | |||
703 | case REM_POSITION: | 723 | case REM_POSITION: |
704 | app->forgetPosition(); | 724 | app->forgetPosition(); |
705 | break; | 725 | break; |
706 | case REM_HIDDENSTATE: | 726 | case REM_FOCUSHIDDENSTATE: |
707 | app->forgetHiddenstate(); | 727 | app->forgetFocusHiddenstate(); |
728 | break; | ||
729 | case REM_ICONHIDDENSTATE: | ||
730 | app->forgetIconHiddenstate(); | ||
708 | break; | 731 | break; |
709 | case REM_STUCKSTATE: | 732 | case REM_STUCKSTATE: |
710 | app->forgetStuckstate(); | 733 | app->forgetStuckstate(); |
@@ -809,8 +832,10 @@ void Remember::setupFrame(FluxboxWindow &win) { | |||
809 | if (win.isStuck() && !app->stuckstate || | 832 | if (win.isStuck() && !app->stuckstate || |
810 | !win.isStuck() && app->stuckstate) | 833 | !win.isStuck() && app->stuckstate) |
811 | win.stick(); // toggles | 834 | win.stick(); // toggles |
812 | if (app->hiddenstate_remember) | 835 | if (app->focushiddenstate_remember) |
813 | win.setHidden(true); | 836 | win.setFocusHidden(true); |
837 | if (app->iconhiddenstate_remember) | ||
838 | win.setIconHidden(true); | ||
814 | 839 | ||
815 | if (app->layer_remember) | 840 | if (app->layer_remember) |
816 | win.moveToLayer(app->layer); | 841 | win.moveToLayer(app->layer); |