fix most commands to run on screen mouse is in, rather than focused window
This commit is contained in:
parent
2f1f364fa2
commit
9c3b06945a
4 changed files with 18 additions and 12 deletions
|
@ -1,6 +1,9 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.5:
|
||||
*03/07/19:
|
||||
* Make most Commands execute on mouse screen rather than screen
|
||||
of focused window (Simon)
|
||||
FbCommands.cc WorkspaceCmd.cc
|
||||
* Fix xinerama options (again) for Slit and Toolbar (Simon)
|
||||
Xinerama.hh Slit.hh/cc Toolbar.hh/cc
|
||||
* Move menu alpha setting into MenuTheme (Simon)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbCommands.cc,v 1.11 2003/07/01 20:24:19 fluxgen Exp $
|
||||
// $Id: FbCommands.cc,v 1.12 2003/07/19 13:51:24 rathnor Exp $
|
||||
|
||||
#include "FbCommands.hh"
|
||||
#include "fluxbox.hh"
|
||||
|
@ -47,10 +47,10 @@ void ExecuteCmd::execute() {
|
|||
char intbuff[64];
|
||||
int screen_num = m_screen_num;
|
||||
if (screen_num < 0) {
|
||||
if (Fluxbox::instance()->keyScreen() == 0)
|
||||
if (Fluxbox::instance()->mouseScreen() == 0)
|
||||
screen_num = 0;
|
||||
else
|
||||
screen_num = Fluxbox::instance()->keyScreen()->screenNumber();
|
||||
screen_num = Fluxbox::instance()->mouseScreen()->screenNumber();
|
||||
}
|
||||
|
||||
sprintf(intbuff, "%d", screen_num);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: WorkspaceCmd.cc,v 1.2 2003/07/01 09:47:41 fluxgen Exp $
|
||||
// $Id: WorkspaceCmd.cc,v 1.3 2003/07/19 13:51:24 rathnor Exp $
|
||||
|
||||
#include "WorkspaceCmd.hh"
|
||||
#include "Workspace.hh"
|
||||
|
@ -74,25 +74,25 @@ void PrevWindowCmd::execute() {
|
|||
}
|
||||
|
||||
void NextWorkspaceCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0)
|
||||
screen->nextWorkspace();
|
||||
}
|
||||
|
||||
void PrevWorkspaceCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0)
|
||||
screen->prevWorkspace();
|
||||
}
|
||||
|
||||
void LeftWorkspaceCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0)
|
||||
screen->leftWorkspace(m_param);
|
||||
}
|
||||
|
||||
void RightWorkspaceCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0)
|
||||
screen->rightWorkspace(m_param);
|
||||
}
|
||||
|
@ -100,14 +100,14 @@ void RightWorkspaceCmd::execute() {
|
|||
JumpToWorkspaceCmd::JumpToWorkspaceCmd(int workspace_num):m_workspace_num(workspace_num) { }
|
||||
|
||||
void JumpToWorkspaceCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0 && m_workspace_num >= 0 && m_workspace_num < screen->getNumberOfWorkspaces())
|
||||
screen->changeWorkspaceID(m_workspace_num);
|
||||
}
|
||||
|
||||
|
||||
void ArrangeWindowsCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen == 0)
|
||||
return;
|
||||
|
||||
|
@ -159,7 +159,7 @@ void ArrangeWindowsCmd::execute() {
|
|||
}
|
||||
|
||||
void ShowDesktopCmd::execute() {
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: fluxbox.hh,v 1.66 2003/07/19 11:55:49 rathnor Exp $
|
||||
// $Id: fluxbox.hh,v 1.67 2003/07/19 13:51:24 rathnor Exp $
|
||||
|
||||
#ifndef FLUXBOX_HH
|
||||
#define FLUXBOX_HH
|
||||
|
@ -191,8 +191,11 @@ public:
|
|||
bool haveShape() const { return m_have_shape; }
|
||||
int shapeEventbase() const { return m_shape_eventbase; }
|
||||
void getDefaultDataFilename(char *, std::string &);
|
||||
// screen mouse was in at last key event
|
||||
BScreen *mouseScreen() { return m_mousescreen; }
|
||||
// screen of window that last key event (i.e. focused window) went to
|
||||
BScreen *keyScreen() { return m_keyscreen; }
|
||||
// screen we are watching for modifier changes
|
||||
BScreen *watchingScreen() { return m_watching_screen; }
|
||||
const XEvent &lastEvent() const { return m_last_event; }
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue