synched with bb-cvs. couple bug fixes.
This commit is contained in:
parent
7a55323343
commit
aad50046de
5 changed files with 14 additions and 12 deletions
|
@ -1040,10 +1040,14 @@ void BScreen::changeWorkspaceID(unsigned int id) {
|
||||||
|
|
||||||
workspacemenu->setItemSelected(current_workspace->getID() + 2, False);
|
workspacemenu->setItemSelected(current_workspace->getID() + 2, False);
|
||||||
|
|
||||||
if (blackbox->getFocusedWindow() &&
|
BlackboxWindow *focused = blackbox->getFocusedWindow();
|
||||||
blackbox->getFocusedWindow()->getScreen() == this &&
|
if (focused && focused->getScreen() == this && ! focused->isStuck()) {
|
||||||
! blackbox->getFocusedWindow()->isStuck()) {
|
if (focused->getWorkspaceNumber() != current_workspace->getID()) {
|
||||||
current_workspace->setLastFocusedWindow(blackbox->getFocusedWindow());
|
fprintf(stderr, "%s is on the wrong workspace, aborting\n",
|
||||||
|
focused->getTitle());
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
current_workspace->setLastFocusedWindow(focused);
|
||||||
blackbox->setFocusedWindow((BlackboxWindow *) 0);
|
blackbox->setFocusedWindow((BlackboxWindow *) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1079,6 +1083,7 @@ void BScreen::manageWindow(Window w) {
|
||||||
|
|
||||||
XMapRequestEvent mre;
|
XMapRequestEvent mre;
|
||||||
mre.window = w;
|
mre.window = w;
|
||||||
|
if (blackbox->isStartup())
|
||||||
win->restoreAttributes();
|
win->restoreAttributes();
|
||||||
win->mapRequestEvent(&mre);
|
win->mapRequestEvent(&mre);
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,7 +268,6 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
|
||||||
|
|
||||||
|
|
||||||
BlackboxWindow::~BlackboxWindow(void) {
|
BlackboxWindow::~BlackboxWindow(void) {
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "BlackboxWindow::~BlackboxWindow: destroying 0x%lx\n",
|
fprintf(stderr, "BlackboxWindow::~BlackboxWindow: destroying 0x%lx\n",
|
||||||
client.window);
|
client.window);
|
||||||
|
|
|
@ -224,7 +224,6 @@ void Workspace::lowerTransients(const BlackboxWindow * const win,
|
||||||
wkspc->stackingList.push_back((*it));
|
wkspc->stackingList.push_back((*it));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -666,10 +666,9 @@ void Blackbox::process_event(XEvent *e) {
|
||||||
} else if(e->xclient.message_type == getBlackboxChangeWorkspaceAtom()) {
|
} else if(e->xclient.message_type == getBlackboxChangeWorkspaceAtom()) {
|
||||||
BScreen *screen = searchScreen(e->xclient.window);
|
BScreen *screen = searchScreen(e->xclient.window);
|
||||||
|
|
||||||
if (screen && e->xclient.data.l[0] >= 0 &&
|
unsigned int workspace = e->xclient.data.l[0];
|
||||||
e->xclient.data.l[0] <
|
if (screen && workspace < screen->getWorkspaceCount())
|
||||||
static_cast<signed>(screen->getWorkspaceCount()))
|
screen->changeWorkspaceID(workspace);
|
||||||
screen->changeWorkspaceID(e->xclient.data.l[0]);
|
|
||||||
} else if (e->xclient.message_type == getBlackboxChangeWindowFocusAtom()) {
|
} else if (e->xclient.message_type == getBlackboxChangeWindowFocusAtom()) {
|
||||||
BlackboxWindow *win = searchWindow(e->xclient.window);
|
BlackboxWindow *win = searchWindow(e->xclient.window);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ bsetroot_LDADD = ../src/BaseDisplay.o ../src/Color.o ../src/GCCache.o ../src/Tex
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
rm -f *\~
|
rm -f *\~ .\#*
|
||||||
|
|
||||||
# local dependencies
|
# local dependencies
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue