From 4bc5d80ba7da019cfeeded6e3fc75bece963a49d Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 23 Jul 2002 13:49:01 +0000 Subject: added window specific send to --- src/Windowmenu.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Windowmenu.cc b/src/Windowmenu.cc index dd55b0e..d4bd8fb 100644 --- a/src/Windowmenu.cc +++ b/src/Windowmenu.cc @@ -21,7 +21,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Windowmenu.cc,v 1.14 2002/05/15 09:37:27 fluxgen Exp $ +// $Id: Windowmenu.cc,v 1.15 2002/07/23 13:49:01 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -218,13 +218,22 @@ void Windowmenu::SendtoWorkspacemenu::itemSelected(int button, unsigned int inde if (button > 2) return; if (index <= windowmenu->screen->getCount()) { - if (index == windowmenu->screen->getCurrentWorkspaceID()) return; - if (windowmenu->window->isStuck()) windowmenu->window->stick(); + + // no need to send it to a workspace it already exist on + if (index == windowmenu->screen->getCurrentWorkspaceID()) + return; - if (button == 1) - windowmenu->screen->sendToWorkspace(index, False); - else if (button == 2) - windowmenu->screen->sendToWorkspace(index); + // if the window is stuck then unstick it + if (windowmenu->window->isStuck()) + windowmenu->window->stick(); + + if (button == 1) { // send to workspace without changing workspace + windowmenu->screen->sendToWorkspace(index, + windowmenu->window, false); + } else if (button == 2) { // send to workspace and change workspace + windowmenu->screen->sendToWorkspace(index, + windowmenu->window, true); + } } hide(); -- cgit v0.11.2