diff options
author | markt <markt> | 2006-07-30 23:50:43 (GMT) |
---|---|---|
committer | markt <markt> | 2006-07-30 23:50:43 (GMT) |
commit | f031de3c32e26c7f71f7642f4bdab2f8ca7d90d2 (patch) | |
tree | f24e292a520b5f1468d4afbcb7caf38831fa6cc4 /src | |
parent | e66c3dd866bb1f7108b8dcecdc7c4dda37e95ee3 (diff) | |
download | fluxbox_pavel-f031de3c32e26c7f71f7642f4bdab2f8ca7d90d2.zip fluxbox_pavel-f031de3c32e26c7f71f7642f4bdab2f8ca7d90d2.tar.bz2 |
little cleanup, remove FluxboxWindow::isInitialized()
Diffstat (limited to 'src')
-rw-r--r-- | src/Gnome.cc | 2 | ||||
-rw-r--r-- | src/WinClient.cc | 2 | ||||
-rw-r--r-- | src/Window.cc | 32 | ||||
-rw-r--r-- | src/Window.hh | 1 |
4 files changed, 16 insertions, 21 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc index 917c810..81803dd 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc | |||
@@ -242,7 +242,7 @@ void Gnome::updateWorkspaceCount(BScreen &screen) { | |||
242 | } | 242 | } |
243 | 243 | ||
244 | void Gnome::updateWorkspace(FluxboxWindow &win) { | 244 | void Gnome::updateWorkspace(FluxboxWindow &win) { |
245 | long val = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); | 245 | long val = win.workspaceNumber(); |
246 | if (win.isStuck()) { | 246 | if (win.isStuck()) { |
247 | val = -1; | 247 | val = -1; |
248 | } | 248 | } |
diff --git a/src/WinClient.cc b/src/WinClient.cc index 73b5d45..b8149b2 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc | |||
@@ -515,7 +515,7 @@ void WinClient::updateWMHints() { | |||
515 | else | 515 | else |
516 | m_icon_mask = 0; | 516 | m_icon_mask = 0; |
517 | 517 | ||
518 | if (m_win && m_win->isInitialized()) { | 518 | if (m_win) { |
519 | if (wmhint->flags & XUrgencyHint) { | 519 | if (wmhint->flags & XUrgencyHint) { |
520 | Fluxbox::instance()->attentionHandler().addAttention(*this); | 520 | Fluxbox::instance()->attentionHandler().addAttention(*this); |
521 | } else { | 521 | } else { |
diff --git a/src/Window.cc b/src/Window.cc index b1b91cb..ccdc613 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -508,9 +508,6 @@ void FluxboxWindow::init() { | |||
508 | 508 | ||
509 | restoreAttributes(); | 509 | restoreAttributes(); |
510 | 510 | ||
511 | if (m_workspace_number < 0 || m_workspace_number >= screen().numberOfWorkspaces()) | ||
512 | m_workspace_number = screen().currentWorkspaceID(); | ||
513 | |||
514 | bool place_window = (m_old_pos_x == 0); | 511 | bool place_window = (m_old_pos_x == 0); |
515 | 512 | ||
516 | if (fluxbox.isStartup()) | 513 | if (fluxbox.isStartup()) |
@@ -560,7 +557,6 @@ void FluxboxWindow::init() { | |||
560 | moveResize(frame().x(), frame().y(), real_width, real_height); | 557 | moveResize(frame().x(), frame().y(), real_width, real_height); |
561 | 558 | ||
562 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); | 559 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); |
563 | setWorkspace(m_workspace_number); | ||
564 | 560 | ||
565 | if (maximized && functions.maximize) { // start maximized | 561 | if (maximized && functions.maximize) { // start maximized |
566 | // This will set it to the appropriate style of maximisation | 562 | // This will set it to the appropriate style of maximisation |
@@ -1317,7 +1313,7 @@ void FluxboxWindow::resize(unsigned int width, unsigned int height) { | |||
1317 | 1313 | ||
1318 | // magic to detect if moved during initialisation | 1314 | // magic to detect if moved during initialisation |
1319 | // we restore the old state, because we were a resize, not a moveResize! | 1315 | // we restore the old state, because we were a resize, not a moveResize! |
1320 | if (!isInitialized()) | 1316 | if (!m_initialized) |
1321 | m_old_pos_x = old_x; | 1317 | m_old_pos_x = old_x; |
1322 | } | 1318 | } |
1323 | 1319 | ||
@@ -1326,7 +1322,7 @@ void FluxboxWindow::moveResize(int new_x, int new_y, | |||
1326 | unsigned int new_width, unsigned int new_height, bool send_event) { | 1322 | unsigned int new_width, unsigned int new_height, bool send_event) { |
1327 | 1323 | ||
1328 | // magic to detect if moved during initialisation | 1324 | // magic to detect if moved during initialisation |
1329 | if (!isInitialized()) | 1325 | if (!m_initialized) |
1330 | m_old_pos_x = 1; | 1326 | m_old_pos_x = 1; |
1331 | 1327 | ||
1332 | send_event = send_event || (frame().x() != new_x || frame().y() != new_y); | 1328 | send_event = send_event || (frame().x() != new_x || frame().y() != new_y); |
@@ -1367,7 +1363,7 @@ void FluxboxWindow::moveResizeForClient(int new_x, int new_y, | |||
1367 | unsigned int new_width, unsigned int new_height, int gravity, unsigned int client_bw) { | 1363 | unsigned int new_width, unsigned int new_height, int gravity, unsigned int client_bw) { |
1368 | 1364 | ||
1369 | // magic to detect if moved during initialisation | 1365 | // magic to detect if moved during initialisation |
1370 | if (!isInitialized()) | 1366 | if (!m_initialized) |
1371 | m_old_pos_x = 1; | 1367 | m_old_pos_x = 1; |
1372 | frame().moveResizeForClient(new_x, new_y, new_width, new_height, gravity, client_bw); | 1368 | frame().moveResizeForClient(new_x, new_y, new_width, new_height, gravity, client_bw); |
1373 | setFocusFlag(focused); | 1369 | setFocusFlag(focused); |
@@ -1804,7 +1800,7 @@ void FluxboxWindow::setWorkspace(int n) { | |||
1804 | m_blackbox_attrib.workspace = m_workspace_number; | 1800 | m_blackbox_attrib.workspace = m_workspace_number; |
1805 | 1801 | ||
1806 | // notify workspace change | 1802 | // notify workspace change |
1807 | if (isInitialized() && !stuck && old_wkspc != m_workspace_number) { | 1803 | if (m_initialized && !stuck && old_wkspc != m_workspace_number) { |
1808 | #ifdef DEBUG | 1804 | #ifdef DEBUG |
1809 | cerr<<this<<" notify workspace signal"<<endl; | 1805 | cerr<<this<<" notify workspace signal"<<endl; |
1810 | #endif // DEBUG | 1806 | #endif // DEBUG |
@@ -1818,7 +1814,7 @@ void FluxboxWindow::setLayerNum(int layernum) { | |||
1818 | m_blackbox_attrib.flags |= ATTRIB_STACK; | 1814 | m_blackbox_attrib.flags |= ATTRIB_STACK; |
1819 | m_blackbox_attrib.stack = layernum; | 1815 | m_blackbox_attrib.stack = layernum; |
1820 | 1816 | ||
1821 | if (isInitialized()) { | 1817 | if (m_initialized) { |
1822 | saveBlackboxAttribs(); | 1818 | saveBlackboxAttribs(); |
1823 | 1819 | ||
1824 | #ifdef DEBUG | 1820 | #ifdef DEBUG |
@@ -1835,7 +1831,7 @@ void FluxboxWindow::shade() { | |||
1835 | return; | 1831 | return; |
1836 | 1832 | ||
1837 | // we're toggling, so if they're equal now, we need to change it | 1833 | // we're toggling, so if they're equal now, we need to change it |
1838 | if (isInitialized() && m_frame.isShaded() == shaded) | 1834 | if (m_initialized && m_frame.isShaded() == shaded) |
1839 | frame().shade(); | 1835 | frame().shade(); |
1840 | 1836 | ||
1841 | if (shaded) { | 1837 | if (shaded) { |
@@ -1843,14 +1839,14 @@ void FluxboxWindow::shade() { | |||
1843 | m_blackbox_attrib.flags ^= ATTRIB_SHADED; | 1839 | m_blackbox_attrib.flags ^= ATTRIB_SHADED; |
1844 | m_blackbox_attrib.attrib ^= ATTRIB_SHADED; | 1840 | m_blackbox_attrib.attrib ^= ATTRIB_SHADED; |
1845 | 1841 | ||
1846 | if (isInitialized()) | 1842 | if (m_initialized) |
1847 | setState(NormalState, false); | 1843 | setState(NormalState, false); |
1848 | } else { | 1844 | } else { |
1849 | shaded = true; | 1845 | shaded = true; |
1850 | m_blackbox_attrib.flags |= ATTRIB_SHADED; | 1846 | m_blackbox_attrib.flags |= ATTRIB_SHADED; |
1851 | m_blackbox_attrib.attrib |= ATTRIB_SHADED; | 1847 | m_blackbox_attrib.attrib |= ATTRIB_SHADED; |
1852 | // shading is the same as iconic | 1848 | // shading is the same as iconic |
1853 | if (isInitialized()) | 1849 | if (m_initialized) |
1854 | setState(IconicState, false); | 1850 | setState(IconicState, false); |
1855 | } | 1851 | } |
1856 | 1852 | ||
@@ -1886,7 +1882,7 @@ void FluxboxWindow::stick() { | |||
1886 | 1882 | ||
1887 | } | 1883 | } |
1888 | 1884 | ||
1889 | if (isInitialized()) { | 1885 | if (m_initialized) { |
1890 | setState(m_current_state, false); | 1886 | setState(m_current_state, false); |
1891 | // notify since some things consider "stuck" to be a pseudo-workspace | 1887 | // notify since some things consider "stuck" to be a pseudo-workspace |
1892 | m_workspacesig.notify(); | 1888 | m_workspacesig.notify(); |
@@ -1958,7 +1954,7 @@ void FluxboxWindow::raiseLayer() { | |||
1958 | if (layerNum() == ::Layer::MENU + 1) | 1954 | if (layerNum() == ::Layer::MENU + 1) |
1959 | return; | 1955 | return; |
1960 | 1956 | ||
1961 | if (!isInitialized()) { | 1957 | if (!m_initialized) { |
1962 | m_layernum++; | 1958 | m_layernum++; |
1963 | return; | 1959 | return; |
1964 | } | 1960 | } |
@@ -1995,7 +1991,7 @@ void FluxboxWindow::raiseLayer() { | |||
1995 | } | 1991 | } |
1996 | 1992 | ||
1997 | void FluxboxWindow::lowerLayer() { | 1993 | void FluxboxWindow::lowerLayer() { |
1998 | if (!isInitialized()) { | 1994 | if (!m_initialized) { |
1999 | if (m_layernum > 0) | 1995 | if (m_layernum > 0) |
2000 | m_layernum--; | 1996 | m_layernum--; |
2001 | return; | 1997 | return; |
@@ -2042,7 +2038,7 @@ void FluxboxWindow::moveToLayer(int layernum) { | |||
2042 | layernum = ::Layer::MENU + 1; | 2038 | layernum = ::Layer::MENU + 1; |
2043 | } | 2039 | } |
2044 | 2040 | ||
2045 | if (!isInitialized()) { | 2041 | if (!m_initialized) { |
2046 | m_layernum = layernum; | 2042 | m_layernum = layernum; |
2047 | return; | 2043 | return; |
2048 | } | 2044 | } |
@@ -2079,13 +2075,13 @@ void FluxboxWindow::moveToLayer(int layernum) { | |||
2079 | 2075 | ||
2080 | void FluxboxWindow::setFocusHidden(bool value) { | 2076 | void FluxboxWindow::setFocusHidden(bool value) { |
2081 | m_focus_hidden = value; | 2077 | m_focus_hidden = value; |
2082 | if (isInitialized()) | 2078 | if (m_initialized) |
2083 | m_statesig.notify(); | 2079 | m_statesig.notify(); |
2084 | } | 2080 | } |
2085 | 2081 | ||
2086 | void FluxboxWindow::setIconHidden(bool value) { | 2082 | void FluxboxWindow::setIconHidden(bool value) { |
2087 | m_icon_hidden= value; | 2083 | m_icon_hidden= value; |
2088 | if (isInitialized()) | 2084 | if (m_initialized) |
2089 | m_statesig.notify(); | 2085 | m_statesig.notify(); |
2090 | } | 2086 | } |
2091 | 2087 | ||
diff --git a/src/Window.hh b/src/Window.hh index 9e9fdce..b58a87a 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -318,7 +318,6 @@ public: | |||
318 | inline bool isFocusHidden() const { return m_focus_hidden; } | 318 | inline bool isFocusHidden() const { return m_focus_hidden; } |
319 | inline bool isIconHidden() const { return m_icon_hidden; } | 319 | inline bool isIconHidden() const { return m_icon_hidden; } |
320 | inline bool isManaged() const { return m_initialized; } | 320 | inline bool isManaged() const { return m_initialized; } |
321 | inline bool isInitialized() const { return m_initialized; } | ||
322 | inline bool isFocused() const { return focused; } | 321 | inline bool isFocused() const { return focused; } |
323 | bool isVisible() const; | 322 | bool isVisible() const; |
324 | inline bool isIconic() const { return iconic; } | 323 | inline bool isIconic() const { return iconic; } |