Skip to content

Commit

Permalink
Update _NET_CURRENT_DESKTOP before showing/hiding windows
Browse files Browse the repository at this point in the history
We update _NET_CURRENT_DESKTOP on the root window before hiding old and showing new windows so that a compositor can adjust it's animation to workspace switches.
  • Loading branch information
pijulius committed Oct 17, 2021
1 parent 1d19662 commit 83ee4db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Screen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,8 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
Workspace *old = currentWorkspace();
m_current_workspace = getWorkspace(id);

m_currentworkspace_sig.emit(*this);

// we show new workspace first in order to appear faster
currentWorkspace()->showAll();

Expand Down Expand Up @@ -1004,8 +1006,6 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
Fluxbox::instance()->ungrab();
FbTk::App::instance()->sync(false);

m_currentworkspace_sig.emit(*this);

// do this after atom handlers, so scripts can access new workspace number
Fluxbox::instance()->keys()->doAction(FocusIn, 0, 0, Keys::ON_DESKTOP);
}
Expand Down

0 comments on commit 83ee4db

Please sign in to comment.