aboutsummaryrefslogtreecommitdiff
path: root/src/ClientMenu.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-04-08 17:57:49 (GMT)
committermarkt <markt>2007-04-08 17:57:49 (GMT)
commit863eca5517b4f91e26d889d598f41816acf60a40 (patch)
tree18be5baa27a1c5fa8523ff951bdf751b8f163a44 /src/ClientMenu.cc
parent12a8b3c038c9ccb577c699d41a1d19602132a7a8 (diff)
downloadfluxbox-863eca5517b4f91e26d889d598f41816acf60a40.zip
fluxbox-863eca5517b4f91e26d889d598f41816acf60a40.tar.bz2
added OnToolbar modifier, removed followModel, fixed unpressed button rendering
Diffstat (limited to 'src/ClientMenu.cc')
-rw-r--r--src/ClientMenu.cc22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/ClientMenu.cc b/src/ClientMenu.cc
index 08acd40..1bb3ad1 100644
--- a/src/ClientMenu.cc
+++ b/src/ClientMenu.cc
@@ -40,27 +40,11 @@ public:
40 ~ClientMenuItem() { m_client.titleSig().detach(menu()); } 40 ~ClientMenuItem() { m_client.titleSig().detach(menu()); }
41 41
42 void click(int button, int time) { 42 void click(int button, int time) {
43 if (m_client.fbwindow() == 0) 43 FluxboxWindow *fbwin = m_client.fbwindow();
44 if (fbwin == 0)
44 return; 45 return;
45 FluxboxWindow &win = *m_client.fbwindow();
46
47 if (win.screen().currentWorkspaceID() != win.workspaceNumber() &&
48 !win.isStuck()) {
49 win.menu().hide();
50 BScreen::FollowModel model = win.screen().getUserFollowModel();
51 if (model == BScreen::IGNORE_OTHER_WORKSPACES)
52 return;
53 // fetch the window to the current workspace
54 else if ((button == 3) ^ (model == BScreen::FETCH_ACTIVE_WINDOW ||
55 win.isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW)) {
56 win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true);
57 return;
58 }
59 // warp to the workspace of the window
60 win.screen().changeWorkspaceID(win.workspaceNumber());
61 }
62 m_client.focus(); 46 m_client.focus();
63 win.raise(); 47 fbwin->raise();
64 } 48 }
65 49
66 const std::string &label() const { return m_client.title(); } 50 const std::string &label() const { return m_client.title(); }