aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 36cc4f2..2b18447 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.242 2003/12/03 23:08:48 fluxgen Exp $ 25// $Id: Screen.cc,v 1.243 2003/12/04 00:08:05 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -866,8 +866,9 @@ void BScreen::changeWorkspaceID(unsigned int id) {
866 866
867 867
868void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS) { 868void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS) {
869 if (! m_current_workspace || id >= m_workspaces_list.size()) 869 if (! m_current_workspace || id >= m_workspaces_list.size()) {
870 return; 870 return;
871 }
871 872
872 if (!win) { 873 if (!win) {
873 WinClient *client = Fluxbox::instance()->getFocusedWindow(); 874 WinClient *client = Fluxbox::instance()->getFocusedWindow();
@@ -875,28 +876,33 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS
875 win = client->fbwindow(); 876 win = client->fbwindow();
876 } 877 }
877 878
878 if (id != currentWorkspace()->workspaceID()) {
879 XSync(FbTk::App::instance()->display(), True);
880 879
881 if (win && &win->screen() == this && 880 XSync(FbTk::App::instance()->display(), True);
882 (! win->isStuck())) {
883 881
884 if (win->isIconic()) { 882 if (win && &win->screen() == this &&
885 win->deiconify(); 883 (! win->isStuck())) {
886 } 884
885 if (win->isIconic()) {
886 win->deiconify();
887 }
887 888
889 if (id != currentWorkspace()->workspaceID())
888 win->withdraw(); 890 win->withdraw();
889 reassociateWindow(win, id, true); 891
892
893 reassociateWindow(win, id, true);
890 894
891 // change workspace ? 895 if (id == currentWorkspace()->workspaceID())
892 if (changeWS) { 896 win->deiconify(false, false);
893 changeWorkspaceID(id);
894 win->setInputFocus();
895 }
896 897
898 // change workspace ?
899 if (changeWS && id != currentWorkspace()->workspaceID()) {
900 changeWorkspaceID(id);
901 win->setInputFocus();
897 } 902 }
898 903
899 } 904 }
905
900} 906}
901 907
902 908