aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-01-04 02:53:26 (GMT)
committermarkt <markt>2007-01-04 02:53:26 (GMT)
commit3bbcd3540e772335f491d49e916ba2e3b2635507 (patch)
treea70dfd73627a611cbc2cb2f93254d9bd9a01d2af
parente71346bd50f28be68ea8ca51f55dab2af23409fa (diff)
downloadfluxbox_paul-3bbcd3540e772335f491d49e916ba2e3b2635507.zip
fluxbox_paul-3bbcd3540e772335f491d49e916ba2e3b2635507.tar.bz2
this seems to be a change that will affect a lot of things,
so it should wait until after 1.0, even though I think it's important
-rw-r--r--ChangeLog4
-rw-r--r--src/Window.cc53
2 files changed, 12 insertions, 45 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ac4991..ae88888 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,6 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/04: 3*07/01/04:
4 * ICCCM compliance updates -- see Section 4.1.4 (Mark)
5 - Set IconicState on all unmapped clients
6 - Unmap all clients when set to IconicState
7 Window.cc
8 * Move minimized windows to the back of the focused list (Mark) 4 * Move minimized windows to the back of the focused list (Mark)
9 Window.cc FocusControl.cc/hh 5 Window.cc FocusControl.cc/hh
10*07/01/03: 6*07/01/03:
diff --git a/src/Window.cc b/src/Window.cc
index 9d79deb..53ec88d 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1536,7 +1536,6 @@ void FluxboxWindow::hide(bool interrupt_moving) {
1536 1536
1537 menu().hide(); 1537 menu().hide();
1538 frame().hide(); 1538 frame().hide();
1539 setState(IconicState,false);
1540} 1539}
1541 1540
1542void FluxboxWindow::show() { 1541void FluxboxWindow::show() {
@@ -1555,6 +1554,8 @@ void FluxboxWindow::iconify() {
1555 1554
1556 iconic = true; 1555 iconic = true;
1557 1556
1557 setState(IconicState, false);
1558
1558 hide(true); 1559 hide(true);
1559 1560
1560 screen().focusControl().setFocusBack(this); 1561 screen().focusControl().setFocusBack(this);
@@ -1896,10 +1897,16 @@ void FluxboxWindow::shade() {
1896 shaded = false; 1897 shaded = false;
1897 m_blackbox_attrib.flags ^= ATTRIB_SHADED; 1898 m_blackbox_attrib.flags ^= ATTRIB_SHADED;
1898 m_blackbox_attrib.attrib ^= ATTRIB_SHADED; 1899 m_blackbox_attrib.attrib ^= ATTRIB_SHADED;
1900
1901 if (m_initialized)
1902 setState(NormalState, false);
1899 } else { 1903 } else {
1900 shaded = true; 1904 shaded = true;
1901 m_blackbox_attrib.flags |= ATTRIB_SHADED; 1905 m_blackbox_attrib.flags |= ATTRIB_SHADED;
1902 m_blackbox_attrib.attrib |= ATTRIB_SHADED; 1906 m_blackbox_attrib.attrib |= ATTRIB_SHADED;
1907 // shading is the same as iconic
1908 if (m_initialized)
1909 setState(IconicState, false);
1903 } 1910 }
1904 1911
1905} 1912}
@@ -2241,29 +2248,10 @@ void FluxboxWindow::setState(unsigned long new_state, bool setting_up) {
2241 state[0] = (unsigned long) m_current_state; 2248 state[0] = (unsigned long) m_current_state;
2242 state[1] = (unsigned long) None; 2249 state[1] = (unsigned long) None;
2243 2250
2244 FbTk::ChangeProperty chg(display, FbAtoms::instance()->getWMStateAtom(), 2251 for_each(m_clientlist.begin(), m_clientlist.end(),
2245 PropModeReplace, (unsigned char *)state, 2); 2252 FbTk::ChangeProperty(display, FbAtoms::instance()->getWMStateAtom(),
2246 2253 PropModeReplace,
2247 ClientList::iterator it = m_clientlist.begin(); 2254 (unsigned char *)state, 2));
2248 ClientList::iterator it_end = m_clientlist.end();
2249 for (; it != it_end; ++it) {
2250 chg(*it);
2251
2252 // ICCCM Section 4.1.4:
2253 // Once a client's window has left the Withdrawn state, the
2254 // window will be mapped if it is in the Normal state and the
2255 // window will be unmapped if it is in the Iconic state.
2256 // Reparenting window managers must unmap the client's window when
2257 // it is in the Iconic state, even if an ancestor window being
2258 // unmapped renders the client's window unviewable. Conversely, if a
2259 // reparenting window manager renders the client's window unviewable
2260 // by unmapping an ancestor, the client's window is by definition in
2261 // the Iconic state and must also be unmapped.
2262 if (new_state == IconicState)
2263 (*it)->hide();
2264 else if (new_state == NormalState)
2265 (*it)->show();
2266 }
2267 2255
2268 saveBlackboxAttribs(); 2256 saveBlackboxAttribs();
2269 //notify state changed 2257 //notify state changed
@@ -2578,23 +2566,6 @@ void FluxboxWindow::unmapNotifyEvent(XUnmapEvent &ue) {
2578 if (client == 0) 2566 if (client == 0)
2579 return; 2567 return;
2580 2568
2581 Atom atom_return;
2582 bool ret = false;
2583 int foo;
2584 unsigned long *state, ulfoo, nitems;
2585 if (client->property(FbAtoms::instance()->getWMStateAtom(),
2586 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(),
2587 &atom_return, &foo, &nitems, &ulfoo,
2588 (unsigned char **) &state) && state) {
2589
2590 if (nitems >= 1 && static_cast<unsigned long>(state[0]) != WithdrawnState);
2591 ret = true;
2592
2593 XFree(static_cast<void *>(state));
2594 if (ret)
2595 return;
2596 }
2597
2598#ifdef DEBUG 2569#ifdef DEBUG
2599 cerr<<__FILE__<<"("<<__FUNCTION__<<"): 0x"<<hex<<client->window()<<dec<<endl; 2570 cerr<<__FILE__<<"("<<__FUNCTION__<<"): 0x"<<hex<<client->window()<<dec<<endl;
2600 cerr<<__FILE__<<"("<<__FUNCTION__<<"): title="<<client->title()<<endl; 2571 cerr<<__FILE__<<"("<<__FUNCTION__<<"): title="<<client->title()<<endl;