From 64813f62fde1345c0130cb70b72cfc00d7698283 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 4 Nov 2007 17:36:40 +0000 Subject: a few random fixes --- src/Screen.cc | 25 +++++++++---------------- src/Window.cc | 10 ++++++++-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 541b30a..720efed 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1201,6 +1201,13 @@ void BScreen::changeWorkspaceID(unsigned int id) { FbTk::App::instance()->sync(false); + // set new workspace + Workspace *old = currentWorkspace(); + m_current_workspace = getWorkspace(id); + + // we show new workspace first in order to appear faster + currentWorkspace()->showAll(); + FluxboxWindow *focused = FocusControl::focusedFbWindow(); if (focused && focused->isMoving()) { @@ -1227,28 +1234,14 @@ void BScreen::changeWorkspaceID(unsigned int id) { (*icon_it)->setWorkspace(id); } - currentWorkspace()->hideAll(false); - - // set new workspace - m_current_workspace = getWorkspace(id); - - // This is a little tricks to reduce flicker - // this way we can set focus pixmap on frame before we show it - // and using ExposeEvent to redraw without flicker - /* - WinClient *win = getLastFocusedWindow(currentWorkspaceID()); - if (win && win->fbwindow()) - win->fbwindow()->setFocusFlag(true); - */ - - currentWorkspace()->showAll(); - if (focused && focused->isMoving()) { focused->focus(); focused->resumeMoving(); } else FocusControl::revertFocus(*this); + old->hideAll(false); + FbTk::App::instance()->sync(false); m_currentworkspace_sig.notify(); diff --git a/src/Window.cc b/src/Window.cc index 5e2f7c8..9184a80 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1954,7 +1954,7 @@ void FluxboxWindow::setFocusFlag(bool focus) { if (focus != frame().focused()) frame().setFocus(focus); - if (screen().focusControl().isCycling()) + if (focus && screen().focusControl().isCycling()) tempRaise(); else if (screen().doAutoRaise()) { if (m_focused) @@ -2486,7 +2486,13 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) { if (now.tv_sec > m_creation_time + 1) m_creation_time = 0; - else { + else if (Remember::instance().isRemembered(*client, + Remember::REM_MAXIMIZEDSTATE) || + Remember::instance().isRemembered(*client, + Remember::REM_FULLSCREENSTATE)) { + cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight); + cr.value_mask = cr.value_mask & ~(CWX | CWY); + } else { if (Remember::instance().isRemembered(*client, Remember::REM_DIMENSIONS)) cr.value_mask = cr.value_mask & ~(CWWidth | CWHeight); -- cgit v0.11.2