aboutsummaryrefslogtreecommitdiff
path: root/src/Clientmenu.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-12 19:19:31 (GMT)
committerfluxgen <fluxgen>2003-01-12 19:19:31 (GMT)
commit60073cee69c6d312dab4508c92fce0fdff5140b2 (patch)
treebf4a2aebd8b8179b4ae55fca670df0611ca1854c /src/Clientmenu.cc
parent6fda6d83face1fd7af864ac519209c677ca90e1e (diff)
downloadfluxbox_paul-60073cee69c6d312dab4508c92fce0fdff5140b2.zip
fluxbox_paul-60073cee69c6d312dab4508c92fce0fdff5140b2.tar.bz2
removed
Diffstat (limited to 'src/Clientmenu.cc')
-rw-r--r--src/Clientmenu.cc66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/Clientmenu.cc b/src/Clientmenu.cc
deleted file mode 100644
index d9335f4..0000000
--- a/src/Clientmenu.cc
+++ /dev/null
@@ -1,66 +0,0 @@
1// Clientmenu.cc for Fluxbox
2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3// Clientmenu.cc for Blackbox - an X11 Window manager
4// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
5//
6// Permission is hereby granted, free of charge, to any person obtaining a
7// copy of this software and associated documentation files (the "Software"),
8// to deal in the Software without restriction, including without limitation
9// the rights to use, copy, modify, merge, publish, distribute, sublicense,
10// and/or sell copies of the Software, and to permit persons to whom the
11// Software is furnished to do so, subject to the following conditions:
12//
13// The above copyright notice and this permission notice shall be included in
14// all copies or substantial portions of the Software.
15//
16// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE.
23
24//use GNU extensions
25#ifndef _GNU_SOURCE
26#define _GNU_SOURCE
27#endif // _GNU_SOURCE
28
29#ifdef HAVE_CONFIG_H
30# include "../config.h"
31#endif // HAVE_CONFIG_H
32
33#include "fluxbox.hh"
34#include "Clientmenu.hh"
35#include "Screen.hh"
36#include "Window.hh"
37#include "Workspace.hh"
38#include "Workspacemenu.hh"
39
40
41Clientmenu::Clientmenu(Workspace &ws) : Basemenu(ws.getScreen()),
42 m_wkspc(ws) {
43 setInternalMenu();
44}
45
46
47void Clientmenu::itemSelected(int button, unsigned int index) {
48 if (button > 2)
49 return;
50 //get the window with index of the item we selected
51 FluxboxWindow *win = m_wkspc.getWindow(index);
52 if (win) {
53 if (button == 1) {
54 if (! m_wkspc.isCurrent())
55 m_wkspc.setCurrent();
56 } else if (button == 2) {
57 if (! m_wkspc.isCurrent())
58 win->deiconify(true, false);
59 }
60 m_wkspc.raiseWindow(win);
61 win->setInputFocus();
62 }
63
64 if (! (screen()->getWorkspacemenu()->isTorn() || isTorn()))
65 hide();
66}