merge the sticky window fix from 1.2.
This commit is contained in:
parent
a25b213aff
commit
67b4df1eff
6 changed files with 64 additions and 39 deletions
|
@ -1,6 +1,8 @@
|
||||||
Changelog for Openbox:
|
Changelog for Openbox:
|
||||||
|
|
||||||
2.0.0:
|
2.0.0:
|
||||||
|
* fixed sticky windows behavior. (Ben Jansens)
|
||||||
|
|
||||||
* make reconfigure reset the timeout values for
|
* make reconfigure reset the timeout values for
|
||||||
windows, the slit, and the toolbar, so that a new
|
windows, the slit, and the toolbar, so that a new
|
||||||
autoRaiseDelay value will take effect without having
|
autoRaiseDelay value will take effect without having
|
||||||
|
|
|
@ -492,7 +492,6 @@ static RETSIGTYPE signalhandler(int sig) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Bool BaseDisplay::validateWindow(Window window) {
|
const Bool BaseDisplay::validateWindow(Window window) {
|
||||||
|
@ -540,6 +539,13 @@ static RETSIGTYPE signalhandler(int sig) {
|
||||||
timerList.remove(timer);
|
timerList.remove(timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< BaseDisplay.cc
|
||||||
|
=======
|
||||||
|
void BaseDisplay::removeTimer(BTimer *timer) {
|
||||||
|
ASSERT(timer != (BTimer *) 0);
|
||||||
|
timerList.remove(timer);
|
||||||
|
}
|
||||||
|
>>>>>>> 1.13.4.1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grabs a button, but also grabs the button in every possible combination with
|
* Grabs a button, but also grabs the button in every possible combination with
|
||||||
|
|
|
@ -1976,11 +1976,9 @@ void BScreen::load() {
|
||||||
workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2,
|
workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2,
|
||||||
False);
|
False);
|
||||||
|
|
||||||
if (openbox.focusedWindow() &&
|
OpenboxWindow *fw = openbox.focusedWindow();
|
||||||
openbox.focusedWindow()->getScreen() == this &&
|
if (fw && fw->getScreen() == this)
|
||||||
(! openbox.focusedWindow()->isStuck())) {
|
|
||||||
openbox.focusWindow(0);
|
openbox.focusWindow(0);
|
||||||
}
|
|
||||||
|
|
||||||
current_workspace = getWorkspace(id);
|
current_workspace = getWorkspace(id);
|
||||||
|
|
||||||
|
|
|
@ -314,9 +314,14 @@ OpenboxWindow::~OpenboxWindow(void) {
|
||||||
XUngrabPointer(display, CurrentTime);
|
XUngrabPointer(display, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workspace_number != -1 && window_number != -1)
|
if (workspace_number != -1 && window_number != -1) {
|
||||||
|
if (flags.stuck) {
|
||||||
|
// make sure no other workspaces think that we're focused
|
||||||
|
for (int i=0; i < screen->getWorkspaceCount(); i++)
|
||||||
|
screen->getWorkspace(i)->removeWindow(this);
|
||||||
|
} else
|
||||||
screen->getWorkspace(workspace_number)->removeWindow(this);
|
screen->getWorkspace(workspace_number)->removeWindow(this);
|
||||||
else if (flags.iconic)
|
} else if (flags.iconic)
|
||||||
screen->removeIcon(this);
|
screen->removeIcon(this);
|
||||||
|
|
||||||
if (timer) {
|
if (timer) {
|
||||||
|
|
|
@ -106,12 +106,21 @@ int Workspace::addWindow(OpenboxWindow *w, bool place) {
|
||||||
int Workspace::removeWindow(OpenboxWindow *w) {
|
int Workspace::removeWindow(OpenboxWindow *w) {
|
||||||
if (! w) return -1;
|
if (! w) return -1;
|
||||||
|
|
||||||
_zorder.remove(w);
|
winVect::iterator winit = std::find(_windows.begin(), _windows.end(), w);
|
||||||
|
|
||||||
if (w->isFocused()) {
|
if (winit == _windows.end()) {
|
||||||
if (w == _last)
|
if (w == _last)
|
||||||
_last = (OpenboxWindow *) 0;
|
_last = (OpenboxWindow *) 0;
|
||||||
|
if (w == _focused)
|
||||||
|
_focused = (OpenboxWindow *) 0;
|
||||||
|
return _windows.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
_zorder.remove(w);
|
||||||
|
|
||||||
|
if (w == _last)
|
||||||
|
_last = (OpenboxWindow *) 0;
|
||||||
|
if (w == _focused) {
|
||||||
OpenboxWindow *fw = (OpenboxWindow *) 0;
|
OpenboxWindow *fw = (OpenboxWindow *) 0;
|
||||||
if (w->isTransient() && w->getTransientFor() &&
|
if (w->isTransient() && w->getTransientFor() &&
|
||||||
w->getTransientFor()->isVisible())
|
w->getTransientFor()->isVisible())
|
||||||
|
@ -125,7 +134,7 @@ int Workspace::removeWindow(OpenboxWindow *w) {
|
||||||
screen.getOpenbox().focusWindow(0);
|
screen.getOpenbox().focusWindow(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_windows.erase(_windows.begin() + w->getWindowNumber());
|
_windows.erase(winit);
|
||||||
clientmenu->remove(w->getWindowNumber());
|
clientmenu->remove(w->getWindowNumber());
|
||||||
clientmenu->update();
|
clientmenu->update();
|
||||||
|
|
||||||
|
@ -140,11 +149,13 @@ int Workspace::removeWindow(OpenboxWindow *w) {
|
||||||
|
|
||||||
|
|
||||||
void Workspace::focusWindow(OpenboxWindow *win) {
|
void Workspace::focusWindow(OpenboxWindow *win) {
|
||||||
if (win != (OpenboxWindow *) 0)
|
|
||||||
clientmenu->setItemSelected(win->getWindowNumber(), true);
|
|
||||||
if (_focused != (OpenboxWindow *) 0)
|
if (_focused != (OpenboxWindow *) 0)
|
||||||
clientmenu->setItemSelected(_focused->getWindowNumber(), false);
|
clientmenu->setItemSelected(_focused->getWindowNumber(), false);
|
||||||
_focused = win;
|
_focused = win;
|
||||||
|
// make sure the focused window belongs to this workspace before highlighting
|
||||||
|
// it in the menu (sticky windows arent in this workspace's menu).
|
||||||
|
if (_focused != (OpenboxWindow *) 0 && _focused->getWorkspaceNumber() == id)
|
||||||
|
clientmenu->setItemSelected(_focused->getWindowNumber(), true);
|
||||||
if (win != (OpenboxWindow *) 0)
|
if (win != (OpenboxWindow *) 0)
|
||||||
_last = win;
|
_last = win;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1088,6 +1088,9 @@ void Openbox::focusWindow(OpenboxWindow *win) {
|
||||||
if (win && !win->isIconic()) {
|
if (win && !win->isIconic()) {
|
||||||
current_screen = win->getScreen();
|
current_screen = win->getScreen();
|
||||||
tbar = current_screen->getToolbar();
|
tbar = current_screen->getToolbar();
|
||||||
|
if (win->isStuck())
|
||||||
|
wkspc = current_screen->getCurrentWorkspace();
|
||||||
|
else
|
||||||
wkspc = current_screen->getWorkspace(win->getWorkspaceNumber());
|
wkspc = current_screen->getWorkspace(win->getWorkspaceNumber());
|
||||||
win->setFocusFlag(true);
|
win->setFocusFlag(true);
|
||||||
wkspc->focusWindow(win);
|
wkspc->focusWindow(win);
|
||||||
|
|
Loading…
Reference in a new issue