summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-07-23 13:49:01 (GMT)
committerfluxgen <fluxgen>2002-07-23 13:49:01 (GMT)
commit4bc5d80ba7da019cfeeded6e3fc75bece963a49d (patch)
tree7215327ae82e53f7fb98ea7a5a76ffe0282d36aa /src
parenta4373ada5057a752662568088293a1ee9e310273 (diff)
downloadfluxbox_lack-4bc5d80ba7da019cfeeded6e3fc75bece963a49d.zip
fluxbox_lack-4bc5d80ba7da019cfeeded6e3fc75bece963a49d.tar.bz2
added window specific send to
Diffstat (limited to 'src')
-rw-r--r--src/Windowmenu.cc23
1 files 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 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Windowmenu.cc,v 1.14 2002/05/15 09:37:27 fluxgen Exp $ 24// $Id: Windowmenu.cc,v 1.15 2002/07/23 13:49:01 fluxgen Exp $
25 25
26//use GNU extensions 26//use GNU extensions
27#ifndef _GNU_SOURCE 27#ifndef _GNU_SOURCE
@@ -218,13 +218,22 @@ void Windowmenu::SendtoWorkspacemenu::itemSelected(int button, unsigned int inde
218 if (button > 2) return; 218 if (button > 2) return;
219 219
220 if (index <= windowmenu->screen->getCount()) { 220 if (index <= windowmenu->screen->getCount()) {
221 if (index == windowmenu->screen->getCurrentWorkspaceID()) return; 221
222 if (windowmenu->window->isStuck()) windowmenu->window->stick(); 222 // no need to send it to a workspace it already exist on
223 if (index == windowmenu->screen->getCurrentWorkspaceID())
224 return;
223 225
224 if (button == 1) 226 // if the window is stuck then unstick it
225 windowmenu->screen->sendToWorkspace(index, False); 227 if (windowmenu->window->isStuck())
226 else if (button == 2) 228 windowmenu->window->stick();
227 windowmenu->screen->sendToWorkspace(index); 229
230 if (button == 1) { // send to workspace without changing workspace
231 windowmenu->screen->sendToWorkspace(index,
232 windowmenu->window, false);
233 } else if (button == 2) { // send to workspace and change workspace
234 windowmenu->screen->sendToWorkspace(index,
235 windowmenu->window, true);
236 }
228 } 237 }
229 238
230 hide(); 239 hide();