handle toolbars and utility windows proper. also, no more crashes from kpager (i really hope :P), at least not the same way
This commit is contained in:
parent
01096f8674
commit
bc3268b6f9
5 changed files with 39 additions and 8 deletions
|
@ -1313,6 +1313,9 @@ void BScreen::manageWindow(Window w) {
|
||||||
// don't list non-normal windows as managed windows
|
// don't list non-normal windows as managed windows
|
||||||
windowList.push_back(win);
|
windowList.push_back(win);
|
||||||
updateClientList();
|
updateClientList();
|
||||||
|
|
||||||
|
if (win->isTopmost())
|
||||||
|
specialWindowList.push_back(win->getFrameWindow());
|
||||||
} else if (win->isDesktop()) {
|
} else if (win->isDesktop()) {
|
||||||
desktopWindowList.push_back(win->getFrameWindow());
|
desktopWindowList.push_back(win->getFrameWindow());
|
||||||
}
|
}
|
||||||
|
@ -1345,6 +1348,17 @@ void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) {
|
||||||
// we don't list non-normal windows as managed windows
|
// we don't list non-normal windows as managed windows
|
||||||
windowList.remove(w);
|
windowList.remove(w);
|
||||||
updateClientList();
|
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()) {
|
} else if (w->isDesktop()) {
|
||||||
WindowList::iterator it = desktopWindowList.begin();
|
WindowList::iterator it = desktopWindowList.begin();
|
||||||
const WindowList::iterator end = desktopWindowList.end();
|
const WindowList::iterator end = desktopWindowList.end();
|
||||||
|
@ -1495,7 +1509,8 @@ void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) {
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
|
|
||||||
Window *session_stack = new
|
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;
|
unsigned int i = 0, k = num;
|
||||||
|
|
||||||
XRaiseWindow(blackbox->getXDisplay(), iconmenu->getWindowID());
|
XRaiseWindow(blackbox->getXDisplay(), iconmenu->getWindowID());
|
||||||
|
@ -1536,6 +1551,10 @@ void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) {
|
||||||
if (slit->isOnTop())
|
if (slit->isOnTop())
|
||||||
*(session_stack + i++) = slit->getWindowID();
|
*(session_stack + i++) = slit->getWindowID();
|
||||||
|
|
||||||
|
WindowList::iterator sit, send = specialWindowList.end();
|
||||||
|
for (sit = specialWindowList.begin(); sit != send; ++sit)
|
||||||
|
*(session_stack + i++) = *sit;
|
||||||
|
|
||||||
while (k--)
|
while (k--)
|
||||||
*(session_stack + i++) = *(workspace_stack + k);
|
*(session_stack + i++) = *(workspace_stack + k);
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ private:
|
||||||
BlackboxWindowList iconList, windowList;
|
BlackboxWindowList iconList, windowList;
|
||||||
|
|
||||||
typedef std::vector<Window> WindowList;
|
typedef std::vector<Window> WindowList;
|
||||||
WindowList desktopWindowList, systrayWindowList;
|
WindowList specialWindowList, desktopWindowList, systrayWindowList;
|
||||||
|
|
||||||
Slit *slit;
|
Slit *slit;
|
||||||
Toolbar *toolbar;
|
Toolbar *toolbar;
|
||||||
|
|
|
@ -202,14 +202,20 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
|
||||||
case Type_Desktop:
|
case Type_Desktop:
|
||||||
case Type_Dock:
|
case Type_Dock:
|
||||||
case Type_Menu:
|
case Type_Menu:
|
||||||
case Type_Toolbar:
|
blackbox_attrib.workspace = 0; // we do need to belong to a workspace
|
||||||
case Type_Utility:
|
flags.stuck = True; // we show up on all workspaces
|
||||||
case Type_Splash:
|
case Type_Splash:
|
||||||
// none of these windows are decorated or manipulated by the window manager
|
// none of these windows are decorated or manipulated by the window manager
|
||||||
decorations = 0;
|
decorations = 0;
|
||||||
functions = 0;
|
functions = 0;
|
||||||
blackbox_attrib.workspace = 0; // we do need to belong to a workspace
|
break;
|
||||||
flags.stuck = True; // we show up on all workspaces
|
|
||||||
|
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;
|
break;
|
||||||
|
|
||||||
case Type_Dialog:
|
case Type_Dialog:
|
||||||
|
@ -349,6 +355,9 @@ BlackboxWindow::~BlackboxWindow(void) {
|
||||||
if (! timer) // window not managed...
|
if (! timer) // window not managed...
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (flags.moving)
|
||||||
|
endMove();
|
||||||
|
|
||||||
screen->removeStrut(&client.strut);
|
screen->removeStrut(&client.strut);
|
||||||
screen->updateAvailableArea();
|
screen->updateAvailableArea();
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,10 @@ public:
|
||||||
|
|
||||||
// is a 'normal' window? meaning, a standard client application
|
// is a 'normal' window? meaning, a standard client application
|
||||||
inline bool isNormal(void) const
|
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 isDesktop(void) const { return window_type == Type_Desktop; }
|
||||||
|
|
||||||
inline bool hasTitlebar(void) const { return decorations & Decor_Titlebar; }
|
inline bool hasTitlebar(void) const { return decorations & Decor_Titlebar; }
|
||||||
|
|
|
@ -84,7 +84,7 @@ void Workspace::addWindow(BlackboxWindow *w, bool place, bool sticky) {
|
||||||
if (place) placeWindow(w);
|
if (place) placeWindow(w);
|
||||||
|
|
||||||
stackingList.push_front(w);
|
stackingList.push_front(w);
|
||||||
|
|
||||||
if (w->isNormal()) {
|
if (w->isNormal()) {
|
||||||
if (! sticky) {
|
if (! sticky) {
|
||||||
w->setWorkspace(id);
|
w->setWorkspace(id);
|
||||||
|
|
Loading…
Reference in a new issue