diff options
author | fluxgen <fluxgen> | 2003-09-14 10:13:54 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-09-14 10:13:54 (GMT) |
commit | 9928d4505d0ecbcbe6ebc2755739b1a65b52d27f (patch) | |
tree | becc7d830e968cc127ea5afd3d3428680e27986f | |
parent | 02248805872c35ec99fcd75e064ee4a53f9c7be4 (diff) | |
download | fluxbox_lack-9928d4505d0ecbcbe6ebc2755739b1a65b52d27f.zip fluxbox_lack-9928d4505d0ecbcbe6ebc2755739b1a65b52d27f.tar.bz2 |
less flicker on workspace change
-rw-r--r-- | src/Screen.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 077ccfe..b2b35ca 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.232 2003/09/12 23:35:31 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.233 2003/09/14 10:13:54 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -823,6 +823,7 @@ int BScreen::removeLastWorkspace() { | |||
823 | 823 | ||
824 | 824 | ||
825 | void BScreen::changeWorkspaceID(unsigned int id) { | 825 | void BScreen::changeWorkspaceID(unsigned int id) { |
826 | |||
826 | if (! m_current_workspace || id >= m_workspaces_list.size() || | 827 | if (! m_current_workspace || id >= m_workspaces_list.size() || |
827 | id == m_current_workspace->workspaceID()) | 828 | id == m_current_workspace->workspaceID()) |
828 | return; | 829 | return; |
@@ -858,19 +859,26 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
858 | m_current_workspace = getWorkspace(id); | 859 | m_current_workspace = getWorkspace(id); |
859 | 860 | ||
860 | workspacemenu->setItemSelected(currentWorkspace()->workspaceID() + 2, true); | 861 | workspacemenu->setItemSelected(currentWorkspace()->workspaceID() + 2, true); |
862 | // This is a little tricks to reduce flicker | ||
863 | // this way we can set focus pixmap on frame before we show it | ||
864 | // and using ExposeEvent to redraw without flicker | ||
865 | WinClient *win = getLastFocusedWindow(currentWorkspaceID()); | ||
866 | if (win && win->fbwindow()) { | ||
867 | win->fbwindow()->setFocusFlag(true); | ||
868 | } | ||
861 | 869 | ||
862 | currentWorkspace()->showAll(); | 870 | currentWorkspace()->showAll(); |
863 | 871 | ||
864 | if (focused && (focused->isStuck() || focused->isMoving())) { | 872 | if (focused && (focused->isStuck() || focused->isMoving())) |
865 | focused->setInputFocus(); | 873 | focused->setInputFocus(); |
866 | } else | 874 | else |
867 | Fluxbox::instance()->revertFocus(*this); | 875 | Fluxbox::instance()->revertFocus(*this); |
868 | 876 | ||
869 | if (focused && focused->isMoving()) { | 877 | if (focused && focused->isMoving()) |
870 | focused->resumeMoving(); | 878 | focused->resumeMoving(); |
871 | } | ||
872 | 879 | ||
873 | updateNetizenCurrentWorkspace(); | 880 | updateNetizenCurrentWorkspace(); |
881 | |||
874 | } | 882 | } |
875 | 883 | ||
876 | 884 | ||