perhaps fix a segfault here
This commit is contained in:
parent
b8c0c7af12
commit
00391787e3
2 changed files with 7 additions and 6 deletions
|
@ -237,12 +237,13 @@ void Workspace::showAll(void) {
|
||||||
|
|
||||||
void Workspace::hideAll(void) {
|
void Workspace::hideAll(void) {
|
||||||
// withdraw in reverse order to minimize the number of Expose events
|
// withdraw in reverse order to minimize the number of Expose events
|
||||||
BlackboxWindowList::reverse_iterator it = stackingList.rbegin();
|
|
||||||
const BlackboxWindowList::reverse_iterator end = stackingList.rend();
|
BlackboxWindowList lst(stackingList.rbegin(), stackingList.rend());
|
||||||
while (it != end) {
|
|
||||||
|
BlackboxWindowList::iterator it = lst.begin();
|
||||||
|
const BlackboxWindowList::iterator end = lst.end();
|
||||||
|
for (; it != end; ++it) {
|
||||||
BlackboxWindow *bw = *it;
|
BlackboxWindow *bw = *it;
|
||||||
++it; // withdraw removes the current item from the list so we need the next
|
|
||||||
// iterator before that happens
|
|
||||||
// not normal windows cant focus from mouse enters anyways, so we dont
|
// not normal windows cant focus from mouse enters anyways, so we dont
|
||||||
// need to unmap/remap them on workspace changes
|
// need to unmap/remap them on workspace changes
|
||||||
if (! bw->isStuck() || bw->isNormal())
|
if (! bw->isStuck() || bw->isNormal())
|
||||||
|
|
|
@ -712,7 +712,7 @@ void Blackbox::process_event(XEvent *e) {
|
||||||
BScreen *screen = win->getScreen();
|
BScreen *screen = win->getScreen();
|
||||||
|
|
||||||
if (win->isIconic())
|
if (win->isIconic())
|
||||||
win->deiconify(False, True);
|
win->deiconify(False, False);
|
||||||
if (! win->isStuck() &&
|
if (! win->isStuck() &&
|
||||||
(win->getWorkspaceNumber() != screen->getCurrentWorkspaceID()))
|
(win->getWorkspaceNumber() != screen->getCurrentWorkspaceID()))
|
||||||
screen->changeWorkspaceID(win->getWorkspaceNumber());
|
screen->changeWorkspaceID(win->getWorkspaceNumber());
|
||||||
|
|
Loading…
Reference in a new issue