Grab Server when showing or switching desktop
Should reduce exposure events, notably since the windows are not in stack order.
This commit is contained in:
parent
9613d2cd83
commit
f176c10881
2 changed files with 4 additions and 0 deletions
|
@ -953,6 +953,7 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
|
|||
this->focusControl().ignoreAtPointer();
|
||||
|
||||
FbTk::App::instance()->sync(false);
|
||||
XGrabServer(Fluxbox::instance()->display());
|
||||
|
||||
FluxboxWindow *focused = FocusControl::focusedFbWindow();
|
||||
|
||||
|
@ -990,6 +991,7 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
|
|||
|
||||
old->hideAll(false);
|
||||
|
||||
XUngrabServer(Fluxbox::instance()->display());
|
||||
FbTk::App::instance()->sync(false);
|
||||
|
||||
m_currentworkspace_sig.emit(*this);
|
||||
|
|
|
@ -602,6 +602,7 @@ void ShowDesktopCmd::execute() {
|
|||
it_end = wins.end();
|
||||
unsigned int space = screen->currentWorkspaceID();
|
||||
unsigned int count = 0;
|
||||
XGrabServer(Fluxbox::instance()->display());
|
||||
for (; it != it_end; ++it) {
|
||||
if (!(*it)->fbwindow()->isIconic() && ((*it)->fbwindow()->isStuck() ||
|
||||
(*it)->fbwindow()->workspaceNumber() == space) &&
|
||||
|
@ -621,6 +622,7 @@ void ShowDesktopCmd::execute() {
|
|||
}
|
||||
} else
|
||||
FocusControl::revertFocus(*screen);
|
||||
XUngrabServer(Fluxbox::instance()->display());
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue