aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-04 00:08:55 (GMT)
committerfluxgen <fluxgen>2003-12-04 00:08:55 (GMT)
commita8f39f0d7a97dc1a4438b7df3a667895fb23604d (patch)
tree26390eeeb0ad1f41cc762a46d6ab07dd89c53afd /src/Screen.cc
parentf7fc364a4cd6ca6ac89902880151045e55241502 (diff)
downloadfluxbox-a8f39f0d7a97dc1a4438b7df3a667895fb23604d.zip
fluxbox-a8f39f0d7a97dc1a4438b7df3a667895fb23604d.tar.bz2
fixed send to bug
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