summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-19 13:51:24 (GMT)
committerrathnor <rathnor>2003-07-19 13:51:24 (GMT)
commit9c3b06945a4079f1cbd83441a0a68fc6694b6be5 (patch)
treef569aecc7f6dec622a62cb8dcbc3ebb4f0b984d0
parent2f1f364fa2d7c72b93d4dbcde321abace5e2109d (diff)
downloadfluxbox_lack-9c3b06945a4079f1cbd83441a0a68fc6694b6be5.zip
fluxbox_lack-9c3b06945a4079f1cbd83441a0a68fc6694b6be5.tar.bz2
fix most commands to run on screen mouse is in, rather than focused window
-rw-r--r--ChangeLog3
-rw-r--r--src/FbCommands.cc6
-rw-r--r--src/WorkspaceCmd.cc16
-rw-r--r--src/fluxbox.hh5
4 files changed, 18 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index d2619be..352ce5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.5: 2Changes for 0.9.5:
3*03/07/19: 3*03/07/19:
4 * Make most Commands execute on mouse screen rather than screen
5 of focused window (Simon)
6 FbCommands.cc WorkspaceCmd.cc
4 * Fix xinerama options (again) for Slit and Toolbar (Simon) 7 * Fix xinerama options (again) for Slit and Toolbar (Simon)
5 Xinerama.hh Slit.hh/cc Toolbar.hh/cc 8 Xinerama.hh Slit.hh/cc Toolbar.hh/cc
6 * Move menu alpha setting into MenuTheme (Simon) 9 * Move menu alpha setting into MenuTheme (Simon)
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index 1c84154..3529ebf 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbCommands.cc,v 1.11 2003/07/01 20:24:19 fluxgen Exp $ 22// $Id: FbCommands.cc,v 1.12 2003/07/19 13:51:24 rathnor Exp $
23 23
24#include "FbCommands.hh" 24#include "FbCommands.hh"
25#include "fluxbox.hh" 25#include "fluxbox.hh"
@@ -47,10 +47,10 @@ void ExecuteCmd::execute() {
47 char intbuff[64]; 47 char intbuff[64];
48 int screen_num = m_screen_num; 48 int screen_num = m_screen_num;
49 if (screen_num < 0) { 49 if (screen_num < 0) {
50 if (Fluxbox::instance()->keyScreen() == 0) 50 if (Fluxbox::instance()->mouseScreen() == 0)
51 screen_num = 0; 51 screen_num = 0;
52 else 52 else
53 screen_num = Fluxbox::instance()->keyScreen()->screenNumber(); 53 screen_num = Fluxbox::instance()->mouseScreen()->screenNumber();
54 } 54 }
55 55
56 sprintf(intbuff, "%d", screen_num); 56 sprintf(intbuff, "%d", screen_num);
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index 45bf7a2..ac71112 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: WorkspaceCmd.cc,v 1.2 2003/07/01 09:47:41 fluxgen Exp $ 23// $Id: WorkspaceCmd.cc,v 1.3 2003/07/19 13:51:24 rathnor Exp $
24 24
25#include "WorkspaceCmd.hh" 25#include "WorkspaceCmd.hh"
26#include "Workspace.hh" 26#include "Workspace.hh"
@@ -74,25 +74,25 @@ void PrevWindowCmd::execute() {
74} 74}
75 75
76void NextWorkspaceCmd::execute() { 76void NextWorkspaceCmd::execute() {
77 BScreen *screen = Fluxbox::instance()->keyScreen(); 77 BScreen *screen = Fluxbox::instance()->mouseScreen();
78 if (screen != 0) 78 if (screen != 0)
79 screen->nextWorkspace(); 79 screen->nextWorkspace();
80} 80}
81 81
82void PrevWorkspaceCmd::execute() { 82void PrevWorkspaceCmd::execute() {
83 BScreen *screen = Fluxbox::instance()->keyScreen(); 83 BScreen *screen = Fluxbox::instance()->mouseScreen();
84 if (screen != 0) 84 if (screen != 0)
85 screen->prevWorkspace(); 85 screen->prevWorkspace();
86} 86}
87 87
88void LeftWorkspaceCmd::execute() { 88void LeftWorkspaceCmd::execute() {
89 BScreen *screen = Fluxbox::instance()->keyScreen(); 89 BScreen *screen = Fluxbox::instance()->mouseScreen();
90 if (screen != 0) 90 if (screen != 0)
91 screen->leftWorkspace(m_param); 91 screen->leftWorkspace(m_param);
92} 92}
93 93
94void RightWorkspaceCmd::execute() { 94void RightWorkspaceCmd::execute() {
95 BScreen *screen = Fluxbox::instance()->keyScreen(); 95 BScreen *screen = Fluxbox::instance()->mouseScreen();
96 if (screen != 0) 96 if (screen != 0)
97 screen->rightWorkspace(m_param); 97 screen->rightWorkspace(m_param);
98} 98}
@@ -100,14 +100,14 @@ void RightWorkspaceCmd::execute() {
100JumpToWorkspaceCmd::JumpToWorkspaceCmd(int workspace_num):m_workspace_num(workspace_num) { } 100JumpToWorkspaceCmd::JumpToWorkspaceCmd(int workspace_num):m_workspace_num(workspace_num) { }
101 101
102void JumpToWorkspaceCmd::execute() { 102void JumpToWorkspaceCmd::execute() {
103 BScreen *screen = Fluxbox::instance()->keyScreen(); 103 BScreen *screen = Fluxbox::instance()->mouseScreen();
104 if (screen != 0 && m_workspace_num >= 0 && m_workspace_num < screen->getNumberOfWorkspaces()) 104 if (screen != 0 && m_workspace_num >= 0 && m_workspace_num < screen->getNumberOfWorkspaces())
105 screen->changeWorkspaceID(m_workspace_num); 105 screen->changeWorkspaceID(m_workspace_num);
106} 106}
107 107
108 108
109void ArrangeWindowsCmd::execute() { 109void ArrangeWindowsCmd::execute() {
110 BScreen *screen = Fluxbox::instance()->keyScreen(); 110 BScreen *screen = Fluxbox::instance()->mouseScreen();
111 if (screen == 0) 111 if (screen == 0)
112 return; 112 return;
113 113
@@ -159,7 +159,7 @@ void ArrangeWindowsCmd::execute() {
159} 159}
160 160
161void ShowDesktopCmd::execute() { 161void ShowDesktopCmd::execute() {
162 BScreen *screen = Fluxbox::instance()->keyScreen(); 162 BScreen *screen = Fluxbox::instance()->mouseScreen();
163 if (screen == 0) 163 if (screen == 0)
164 return; 164 return;
165 165
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index d4c109c..1975929 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -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: fluxbox.hh,v 1.66 2003/07/19 11:55:49 rathnor Exp $ 25// $Id: fluxbox.hh,v 1.67 2003/07/19 13:51:24 rathnor Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -191,8 +191,11 @@ public:
191 bool haveShape() const { return m_have_shape; } 191 bool haveShape() const { return m_have_shape; }
192 int shapeEventbase() const { return m_shape_eventbase; } 192 int shapeEventbase() const { return m_shape_eventbase; }
193 void getDefaultDataFilename(char *, std::string &); 193 void getDefaultDataFilename(char *, std::string &);
194 // screen mouse was in at last key event
194 BScreen *mouseScreen() { return m_mousescreen; } 195 BScreen *mouseScreen() { return m_mousescreen; }
196 // screen of window that last key event (i.e. focused window) went to
195 BScreen *keyScreen() { return m_keyscreen; } 197 BScreen *keyScreen() { return m_keyscreen; }
198 // screen we are watching for modifier changes
196 BScreen *watchingScreen() { return m_watching_screen; } 199 BScreen *watchingScreen() { return m_watching_screen; }
197 const XEvent &lastEvent() const { return m_last_event; } 200 const XEvent &lastEvent() const { return m_last_event; }
198private: 201private: