From f66d91cf2281e9a7aec64b7c903c1ba91898324f Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 29 Jul 2006 06:28:58 +0000 Subject: --- ChangeLog | 6 +++++ src/Ewmh.cc | 63 +++++++---------------------------------------------- src/FocusControl.hh | 2 ++ src/Window.cc | 2 +- 4 files changed, 17 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44801b7..cb74e0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*06/07/29: + * Make _NET_CLIENT_LIST report windows in creation order - still need to fix + _NET_CLIENT_LIST_STACKING (Mark) + FocusControl.hh Ewmh.cc + * Set _NET_WM_DESKTOP appropriately on remembered windows (Mark) + Window.cc Ewmh.cc *06/07/27: * Don't change the order of creating windows with transients on restart. Rather, just move the transient to the end of the list. This preserves the diff --git a/src/Ewmh.cc b/src/Ewmh.cc index b6c765e..51f7fa8 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -31,6 +31,7 @@ #include "WinClientUtil.hh" #include "fluxbox.hh" #include "FbWinFrameTheme.hh" +#include "FocusControl.hh" #include "FbTk/App.hh" #include "FbTk/FbWindow.hh" @@ -366,29 +367,10 @@ void Ewmh::updateClientClose(WinClient &winclient){ } void Ewmh::updateClientList(BScreen &screen) { - size_t num=0; - - BScreen::Workspaces::const_iterator workspace_it = - screen.getWorkspacesList().begin(); - const BScreen::Workspaces::const_iterator workspace_it_end = - screen.getWorkspacesList().end(); - for (; workspace_it != workspace_it_end; ++workspace_it) { - Workspace::Windows::iterator win_it = - (*workspace_it)->windowList().begin(); - Workspace::Windows::iterator win_it_end = - (*workspace_it)->windowList().end(); - for (; win_it != win_it_end; ++win_it) { - num += (*win_it)->numClients(); - } - } - // and count icons - BScreen::Icons::const_iterator icon_it = screen.iconList().begin(); - BScreen::Icons::const_iterator icon_it_end = screen.iconList().end(); - for (; icon_it != icon_it_end; ++icon_it) { - num += (*icon_it)->numClients(); - } + std::list creation_order_list = screen.focusControl().creationOrderList(); + size_t num = creation_order_list.size(); Window *wl = FB_new_nothrow Window[num]; if (wl == 0) { _FB_USES_NLS; @@ -397,39 +379,12 @@ void Ewmh::updateClientList(BScreen &screen) { return; } - //start the iterator from begining - workspace_it = screen.getWorkspacesList().begin(); int win=0; - for (; workspace_it != workspace_it_end; ++workspace_it) { - - // Fill in array of window ID's - Workspace::Windows::const_iterator it = - (*workspace_it)->windowList().begin(); - Workspace::Windows::const_iterator it_end = - (*workspace_it)->windowList().end(); - for (; it != it_end; ++it) { - if ((*it)->numClients() == 1) { - wl[win++] = (*it)->clientWindow(); - } else { - // add every client in fluxboxwindow to list window list - std::list::iterator client_it = - (*it)->clientList().begin(); - std::list::iterator client_it_end = - (*it)->clientList().end(); - for (; client_it != client_it_end; ++client_it) - wl[win++] = (*client_it)->window(); - } - } - } + std::list::iterator client_it = creation_order_list.begin(); + std::list::iterator client_it_end = creation_order_list.end(); + for (; client_it != client_it_end; ++client_it) + wl[win++] = (*client_it)->window(); - // plus iconified windows - icon_it = screen.iconList().begin(); - for (; icon_it != icon_it_end; ++icon_it) { - FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin(); - FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end(); - for (; client_it != client_it_end; ++client_it) - wl[win++] = (*client_it)->window(); - } //number of windows to show in client list num = win; @@ -703,9 +658,7 @@ void Ewmh::updateHints(FluxboxWindow &win) { } void Ewmh::updateWorkspace(FluxboxWindow &win) { - long workspace = win.isInitialized() ? - win.workspaceNumber() : - win.screen().currentWorkspaceID(); + long workspace = win.workspaceNumber(); if (win.isStuck()) workspace = -1; // appear on all desktops/workspaces diff --git a/src/FocusControl.hh b/src/FocusControl.hh index 0e64de8..ff716a3 100644 --- a/src/FocusControl.hh +++ b/src/FocusControl.hh @@ -94,6 +94,8 @@ public: WinClient *lastFocusedWindow(int workspace); WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client); + FocusedWindows &creationOrderList() { return m_creation_order_list; } + void removeClient(WinClient &client); void shutdown(); diff --git a/src/Window.cc b/src/Window.cc index fdff04c..b1b91cb 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -424,7 +424,7 @@ void FluxboxWindow::init() { m_last_focus_time.tv_sec = m_last_focus_time.tv_usec = 0; - m_blackbox_attrib.workspace = m_workspace_number = ~0; + m_blackbox_attrib.workspace = m_workspace_number = m_screen.currentWorkspaceID(); m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; -- cgit v0.11.2