From afb4f17938134329e13a220427219809249e8409 Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Tue, 10 Mar 2009 11:28:31 -0400 Subject: 'SetHead 0' -> Send to current head The SetHead command will now accept the special value of '0' to send windows to the currently active head (that is, the head with the mouse pointer). --- doc/asciidoc/fluxbox-keys.txt | 4 +++- doc/fluxbox-keys.5.in | 5 ++++- src/CurrentWindowCmd.cc | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/asciidoc/fluxbox-keys.txt b/doc/asciidoc/fluxbox-keys.txt index 399fc6b..d70495a 100644 --- a/doc/asciidoc/fluxbox-keys.txt +++ b/doc/asciidoc/fluxbox-keys.txt @@ -305,7 +305,9 @@ two arguments;; *SetHead* 'number':: Moves the window to the given display head. Only available when fluxbox - has been compiled with Xinerama support. + has been compiled with Xinerama support. Heads are numbered starting at *1*, + with the special value *0* meaning "Move to the head where the mouse pointer + currently resides". *SendToNextHead* ['offset'] / *SendToPrevHead* ['offset']:: Sends the current window to the next/previous display head. If you diff --git a/doc/fluxbox-keys.5.in b/doc/fluxbox-keys.5.in index 799a8d4..6d69b48 100644 --- a/doc/fluxbox-keys.5.in +++ b/doc/fluxbox-keys.5.in @@ -614,7 +614,10 @@ First value becomes the focused alpha, second becomes the unfocused alpha value\ .PP \fBSetHead\fR \fInumber\fR .RS 4 -Moves the window to the given display head\&. Only available when fluxbox has been compiled with Xinerama support\&. +Moves the window to the given display head\&. Only available when fluxbox has been compiled with Xinerama support\&. Heads are numbered starting at +\fB1\fR, with the special value +\fB0\fR +meaning "Move to the head where the mouse pointer currently resides"\&. .RE .PP \fBSendToNextHead\fR [\fIoffset\fR] / \fBSendToPrevHead\fR [\fIoffset\fR] diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 0300c80..9d97151 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc @@ -213,7 +213,7 @@ void SetHeadCmd::real_execute() { int num = m_head; int total = fbwindow().screen().numHeads(); if (num < 0) num += total + 1; - if (num < 1) num = 1; + if (num < 1) num = fbwindow().screen().getCurrHead(); if (num > total) num = total; fbwindow().setOnHead(num); } -- cgit v0.11.2