From f031de3c32e26c7f71f7642f4bdab2f8ca7d90d2 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 30 Jul 2006 23:50:43 +0000 Subject: little cleanup, remove FluxboxWindow::isInitialized() --- src/Gnome.cc | 2 +- src/WinClient.cc | 2 +- src/Window.cc | 32 ++++++++++++++------------------ 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) { } void Gnome::updateWorkspace(FluxboxWindow &win) { - long val = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); + long val = win.workspaceNumber(); if (win.isStuck()) { val = -1; } 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() { else m_icon_mask = 0; - if (m_win && m_win->isInitialized()) { + if (m_win) { if (wmhint->flags & XUrgencyHint) { Fluxbox::instance()->attentionHandler().addAttention(*this); } 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() { restoreAttributes(); - if (m_workspace_number < 0 || m_workspace_number >= screen().numberOfWorkspaces()) - m_workspace_number = screen().currentWorkspaceID(); - bool place_window = (m_old_pos_x == 0); if (fluxbox.isStartup()) @@ -560,7 +557,6 @@ void FluxboxWindow::init() { moveResize(frame().x(), frame().y(), real_width, real_height); screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); - setWorkspace(m_workspace_number); if (maximized && functions.maximize) { // start maximized // This will set it to the appropriate style of maximisation @@ -1317,7 +1313,7 @@ void FluxboxWindow::resize(unsigned int width, unsigned int height) { // magic to detect if moved during initialisation // we restore the old state, because we were a resize, not a moveResize! - if (!isInitialized()) + if (!m_initialized) m_old_pos_x = old_x; } @@ -1326,7 +1322,7 @@ void FluxboxWindow::moveResize(int new_x, int new_y, unsigned int new_width, unsigned int new_height, bool send_event) { // magic to detect if moved during initialisation - if (!isInitialized()) + if (!m_initialized) m_old_pos_x = 1; 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, unsigned int new_width, unsigned int new_height, int gravity, unsigned int client_bw) { // magic to detect if moved during initialisation - if (!isInitialized()) + if (!m_initialized) m_old_pos_x = 1; frame().moveResizeForClient(new_x, new_y, new_width, new_height, gravity, client_bw); setFocusFlag(focused); @@ -1804,7 +1800,7 @@ void FluxboxWindow::setWorkspace(int n) { m_blackbox_attrib.workspace = m_workspace_number; // notify workspace change - if (isInitialized() && !stuck && old_wkspc != m_workspace_number) { + if (m_initialized && !stuck && old_wkspc != m_workspace_number) { #ifdef DEBUG cerr< 0) m_layernum--; return; @@ -2042,7 +2038,7 @@ void FluxboxWindow::moveToLayer(int layernum) { layernum = ::Layer::MENU + 1; } - if (!isInitialized()) { + if (!m_initialized) { m_layernum = layernum; return; } @@ -2079,13 +2075,13 @@ void FluxboxWindow::moveToLayer(int layernum) { void FluxboxWindow::setFocusHidden(bool value) { m_focus_hidden = value; - if (isInitialized()) + if (m_initialized) m_statesig.notify(); } void FluxboxWindow::setIconHidden(bool value) { m_icon_hidden= value; - if (isInitialized()) + if (m_initialized) m_statesig.notify(); } 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: inline bool isFocusHidden() const { return m_focus_hidden; } inline bool isIconHidden() const { return m_icon_hidden; } inline bool isManaged() const { return m_initialized; } - inline bool isInitialized() const { return m_initialized; } inline bool isFocused() const { return focused; } bool isVisible() const; inline bool isIconic() const { return iconic; } -- cgit v0.11.2