From b8c1d3e5ee0674bfe33d6af78cb6d3ff5cf1d85e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 7 Dec 2003 17:47:42 +0000 Subject: title change signal --- src/Window.cc | 26 +++++++------------------- src/Window.hh | 8 ++++---- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 9dcbf28..0ffaca6 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.247 2003/12/04 21:31:02 fluxgen Exp $ +// $Id: Window.cc,v 1.248 2003/12/07 17:47:42 fluxgen Exp $ #include "Window.hh" @@ -257,6 +257,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client, BScreen &scr, FbWinFrameTheme &t m_workspacesig(*this), m_diesig(*this), m_focussig(*this), + m_titlesig(*this), moving(false), resizing(false), shaded(false), iconic(false), focused(false), stuck(false), m_managed(false), @@ -1057,7 +1058,7 @@ void FluxboxWindow::updateFunctions() { setupWindow(); } -void FluxboxWindow::updateBlackboxHintsFromClient(WinClient &client) { +void FluxboxWindow::updateBlackboxHintsFromClient(const WinClient &client) { const FluxboxWindow::BlackboxHints *hint = client.getBlackboxHint(); if (!hint) return; @@ -1225,7 +1226,7 @@ void FluxboxWindow::iconify() { if (isIconic()) // no need to iconify if we're already return; - m_windowmenu.hide(); + menu().hide(); iconic = true; setState(IconicState); @@ -2133,20 +2134,11 @@ void FluxboxWindow::propertyNotifyEvent(WinClient &client, Atom atom) { break; case XA_WM_ICON_NAME: - client.updateIconTitle(); - updateIconNameFromClient(client); - updateIcon(); - break; - + // update icon title and then do normal XA_WM_NAME stuff + client.updateIconTitle(); case XA_WM_NAME: updateTitleFromClient(client); - - if (! iconic) - screen().getWorkspace(m_workspace_number)->update(); - else - updateIcon(); - - + m_titlesig.notify(); break; case XA_WM_NORMAL_HINTS: { @@ -3028,10 +3020,6 @@ void FluxboxWindow::attachTo(int x, int y) { m_attaching_tab = 0; } -void FluxboxWindow::updateIcon() { - //!! TODO: notify listeners about icon name change -} - void FluxboxWindow::restore(WinClient *client, bool remap) { if (client->m_win != this) return; diff --git a/src/Window.hh b/src/Window.hh index 7db118c..6418347 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.100 2003/10/28 02:17:03 rathnor Exp $ +// $Id: Window.hh,v 1.101 2003/12/07 17:47:42 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH @@ -344,6 +344,7 @@ public: FbTk::Subject &dieSig() { return m_diesig; } const FbTk::Subject &dieSig() const { return m_diesig; } FbTk::Subject &focusSig() { return m_focussig; } + FbTk::Subject &titleSig() { return m_titlesig; } /** @} */ // end group signals const timeval &lastFocusTime() const { return m_last_focus_time;} @@ -375,7 +376,6 @@ private: void stopMoving(); void startResizing(Window win, int x, int y); void stopResizing(Window win=0); - void updateIcon(); /// try to attach current attaching client to a window at pos x, y void attachTo(int x, int y); @@ -385,7 +385,7 @@ private: /// gets icon name from client window void updateIconNameFromClient(WinClient &client); void updateMWMHintsFromClient(WinClient &client); - void updateBlackboxHintsFromClient(WinClient &client); + void updateBlackboxHintsFromClient(const WinClient &client); void saveBlackboxAttribs(); void setNetWMAttributes(); void associateClientWindow(bool use_attrs = false, int x = 0, int y = 0, unsigned int width = 1, unsigned int height = 1); @@ -404,7 +404,7 @@ private: /// sends configurenotify to all clients void sendConfigureNotify(bool send_to_netizens = true); // state and hint signals - WinSubject m_hintsig, m_statesig, m_layersig, m_workspacesig, m_diesig, m_focussig; + WinSubject m_hintsig, m_statesig, m_layersig, m_workspacesig, m_diesig, m_focussig, m_titlesig; // Window states bool moving, resizing, shaded, iconic, -- cgit v0.11.2