all repos — openbox @ bc3268b6f9f86e6aebe0d06ce174b2d603d09c1e

openbox fork - make it a bit more like ryudo

handle toolbars and utility windows proper. also, no more crashes from kpager (i really hope :P), at least not the same way
Dana Jansens danakj@orodu.net
commit

bc3268b6f9f86e6aebe0d06ce174b2d603d09c1e

parent

01096f867493aed2efc2694c986811404288c1f1

5 files changed, 39 insertions(+), 8 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -1313,6 +1313,9 @@ if (win->isNormal()) {

// don't list non-normal windows as managed windows windowList.push_back(win); updateClientList(); + + if (win->isTopmost()) + specialWindowList.push_back(win->getFrameWindow()); } else if (win->isDesktop()) { desktopWindowList.push_back(win->getFrameWindow()); }

@@ -1345,6 +1348,17 @@ if (w->isNormal()) {

// we don't list non-normal windows as managed windows windowList.remove(w); updateClientList(); + + if (w->isTopmost()) { + WindowList::iterator it = specialWindowList.begin(); + const WindowList::iterator end = specialWindowList.end(); + for (; it != end; ++it) + if (*it == w->getFrameWindow()) { + specialWindowList.erase(it); + break; + } + assert(it != end); // the window wasnt a special window? + } } else if (w->isDesktop()) { WindowList::iterator it = desktopWindowList.begin(); const WindowList::iterator end = desktopWindowList.end();

@@ -1495,7 +1509,8 @@ ++bbwins;

#endif // XINERAMA Window *session_stack = new - Window[(num + workspacesList.size() + rootmenuList.size() + bbwins)]; + Window[(num + workspacesList.size() + rootmenuList.size() + + specialWindowList.size() + bbwins)]; unsigned int i = 0, k = num; XRaiseWindow(blackbox->getXDisplay(), iconmenu->getWindowID());

@@ -1535,6 +1550,10 @@ *(session_stack + i++) = toolbar->getWindowID();

if (slit->isOnTop()) *(session_stack + i++) = slit->getWindowID(); + + WindowList::iterator sit, send = specialWindowList.end(); + for (sit = specialWindowList.begin(); sit != send; ++sit) + *(session_stack + i++) = *sit; while (k--) *(session_stack + i++) = *(workspace_stack + k);
M src/Screen.hhsrc/Screen.hh

@@ -120,7 +120,7 @@ NetizenList netizenList;

BlackboxWindowList iconList, windowList; typedef std::vector<Window> WindowList; - WindowList desktopWindowList, systrayWindowList; + WindowList specialWindowList, desktopWindowList, systrayWindowList; Slit *slit; Toolbar *toolbar;
M src/Window.ccsrc/Window.cc

@@ -202,14 +202,20 @@ switch (window_type) {

case Type_Desktop: case Type_Dock: case Type_Menu: - case Type_Toolbar: - case Type_Utility: + blackbox_attrib.workspace = 0; // we do need to belong to a workspace + flags.stuck = True; // we show up on all workspaces case Type_Splash: // none of these windows are decorated or manipulated by the window manager decorations = 0; functions = 0; - blackbox_attrib.workspace = 0; // we do need to belong to a workspace - flags.stuck = True; // we show up on all workspaces + break; + + case Type_Toolbar: + case Type_Utility: + // these windows get less decorations and functionality + decorations &= ~(Decor_Maximize | Decor_Handle | Decor_Iconify | + Decor_Border); + functions &= ~(Func_Maximize | Func_Resize | Func_Iconify); break; case Type_Dialog:

@@ -348,6 +354,9 @@ #endif // DEBUG

if (! timer) // window not managed... return; + + if (flags.moving) + endMove(); screen->removeStrut(&client.strut); screen->updateAvailableArea();
M src/Window.hhsrc/Window.hh

@@ -325,7 +325,10 @@ inline bool isClosable(void) const { return functions & Func_Close; }

// is a 'normal' window? meaning, a standard client application inline bool isNormal(void) const - { return window_type == Type_Dialog || window_type == Type_Normal; } + { return window_type == Type_Dialog || window_type == Type_Normal || + window_type == Type_Toolbar || window_type == Type_Utility; } + inline bool isTopmost(void) const + { return window_type == Type_Toolbar || window_type == Type_Utility; } inline bool isDesktop(void) const { return window_type == Type_Desktop; } inline bool hasTitlebar(void) const { return decorations & Decor_Titlebar; }
M src/Workspace.ccsrc/Workspace.cc

@@ -84,7 +84,7 @@

if (place) placeWindow(w); stackingList.push_front(w); - + if (w->isNormal()) { if (! sticky) { w->setWorkspace(id);