aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-03-03 21:51:13 (GMT)
committerrathnor <rathnor>2003-03-03 21:51:13 (GMT)
commit19875e5a5ba474387971ede597cdc4aa7454d4c0 (patch)
tree99d672abcffa86d74734deacbd888eccde02ffd2 /src/Window.cc
parent824fd0db7a4b8117fecba9bb46053bdd38691803 (diff)
downloadfluxbox-19875e5a5ba474387971ede597cdc4aa7454d4c0.zip
fluxbox-19875e5a5ba474387971ede597cdc4aa7454d4c0.tar.bz2
Add code for toolbar modes
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 9f5cf39..a950ae4 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.127 2003/02/23 13:58:36 rathnor Exp $ 25// $Id: Window.cc,v 1.128 2003/03/03 21:51:09 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -377,7 +377,7 @@ FluxboxWindow::~FluxboxWindow() {
377 Workspace *workspace = screen->getWorkspace(workspace_number); 377 Workspace *workspace = screen->getWorkspace(workspace_number);
378 if (workspace) 378 if (workspace)
379 workspace->removeWindow(this); 379 workspace->removeWindow(this);
380 } else //it's iconic 380 } else
381 screen->removeIcon(this); 381 screen->removeIcon(this);
382 382
383 if (tab != 0) { 383 if (tab != 0) {
@@ -1015,25 +1015,25 @@ void FluxboxWindow::iconify() {
1015 1015
1016 m_windowmenu.hide(); 1016 m_windowmenu.hide();
1017 1017
1018 setState(IconicState);
1019
1020
1021 XSelectInput(display, client.window, NoEventMask); 1018 XSelectInput(display, client.window, NoEventMask);
1022 XUnmapWindow(display, client.window); 1019 XUnmapWindow(display, client.window);
1023 XSelectInput(display, client.window, 1020 XSelectInput(display, client.window,
1024 PropertyChangeMask | StructureNotifyMask | FocusChangeMask); 1021 PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
1025 1022
1026 m_frame.hide();
1027
1028 visible = false; 1023 visible = false;
1029 iconic = true; 1024 iconic = true;
1030 1025
1026 setState(IconicState);
1027
1028 m_frame.hide();
1029
1031 screen->getWorkspace(workspace_number)->removeWindow(this); 1030 screen->getWorkspace(workspace_number)->removeWindow(this);
1032 1031
1033 if (client.transient_for) { 1032 if (client.transient_for) {
1034 if (! client.transient_for->iconic) 1033 if (! client.transient_for->iconic)
1035 client.transient_for->iconify(); 1034 client.transient_for->iconify();
1036 } 1035 }
1036
1037 screen->addIcon(this); 1037 screen->addIcon(this);
1038 1038
1039 if (tab) //if this window got a tab then iconify it too 1039 if (tab) //if this window got a tab then iconify it too
@@ -1057,6 +1057,10 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
1057 } else if (workspace_number != screen->getCurrentWorkspace()->workspaceID()) 1057 } else if (workspace_number != screen->getCurrentWorkspace()->workspaceID())
1058 return; 1058 return;
1059 1059
1060 bool was_iconic = iconic;
1061
1062 iconic = false;
1063 visible = true;
1060 setState(NormalState); 1064 setState(NormalState);
1061 1065
1062 XSelectInput(display, client.window, NoEventMask); 1066 XSelectInput(display, client.window, NoEventMask);
@@ -1066,14 +1070,12 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
1066 1070
1067 m_frame.show(); 1071 m_frame.show();
1068 1072
1069 if (iconic && screen->doFocusNew()) 1073 if (was_iconic && screen->doFocusNew())
1070 setInputFocus(); 1074 setInputFocus();
1071 1075
1072 if (focused != m_frame.focused()) 1076 if (focused != m_frame.focused())
1073 m_frame.setFocus(focused); 1077 m_frame.setFocus(focused);
1074 1078
1075 visible = true;
1076 iconic = false;
1077 1079
1078 if (reassoc && client.transients.size()) { 1080 if (reassoc && client.transients.size()) {
1079 // deiconify all transients 1081 // deiconify all transients