all repos — fluxbox @ f66d91cf2281e9a7aec64b7c903c1ba91898324f

custom fork of the fluxbox windowmanager


        
markt markt
commit

f66d91cf2281e9a7aec64b7c903c1ba91898324f

parent

98fba4fd1a50672a918dccd5c8492556f392762f

4 files changed, 17 insertions(+), 56 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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
M src/Ewmh.ccsrc/Ewmh.cc

@@ -31,6 +31,7 @@ #include "Layer.hh"

#include "WinClientUtil.hh" #include "fluxbox.hh" #include "FbWinFrameTheme.hh" +#include "FocusControl.hh" #include "FbTk/App.hh" #include "FbTk/FbWindow.hh"

@@ -366,29 +367,10 @@ updateClientList(winclient.screen());

} 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(); - } + std::list<WinClient *> creation_order_list = screen.focusControl().creationOrderList(); - } - // 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(); - } - + size_t num = creation_order_list.size(); Window *wl = FB_new_nothrow Window[num]; if (wl == 0) { _FB_USES_NLS;

@@ -397,39 +379,12 @@ "Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl;

return; } - //start the iterator from begining - workspace_it = screen.getWorkspacesList().begin(); int win=0; - for (; workspace_it != workspace_it_end; ++workspace_it) { + std::list<WinClient *>::iterator client_it = creation_order_list.begin(); + std::list<WinClient *>::iterator client_it_end = creation_order_list.end(); + for (; client_it != client_it_end; ++client_it) + wl[win++] = (*client_it)->window(); - // 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<WinClient *>::iterator client_it = - (*it)->clientList().begin(); - std::list<WinClient *>::iterator client_it_end = - (*it)->clientList().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
M src/FocusControl.hhsrc/FocusControl.hh

@@ -94,6 +94,8 @@

WinClient *lastFocusedWindow(int workspace); WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client); + FocusedWindows &creationOrderList() { return m_creation_order_list; } + void removeClient(WinClient &client); void shutdown();
M src/Window.ccsrc/Window.cc

@@ -424,7 +424,7 @@ frame().resize(m_client->width(), m_client->height());

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;