all repos — fluxbox @ 2f1f364fa2d7c72b93d4dbcde321abace5e2109d

custom fork of the fluxbox windowmanager

fix up xinerama for heads of toolbar and slit
rathnor rathnor
commit

2f1f364fa2d7c72b93d4dbcde321abace5e2109d

parent

939e750684971412eda6245ef012435c86ee2d47

8 files changed, 39 insertions(+), 19 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.5: *03/07/19: + * Fix xinerama options (again) for Slit and Toolbar (Simon) + Xinerama.hh Slit.hh/cc Toolbar.hh/cc * Move menu alpha setting into MenuTheme (Simon) - fixes alpha init on multi-screened machines MenuTheme.hh/cc Menu.hh/cc Screen.cc
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.72 2003/07/18 15:40:55 rathnor Exp $ +// $Id: Slit.cc,v 1.73 2003/07/19 11:55:49 rathnor Exp $ #include "Slit.hh"

@@ -1263,7 +1263,7 @@ *screen().menuTheme(),

screen(), screen().imageControl(), *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), - this + *this )); }

@@ -1344,3 +1344,10 @@ void Slit::moveToLayer(int layernum) {

m_layeritem->moveToLayer(layernum); *m_rc_layernum = layernum; } + +void Slit::saveOnHead(int head) { + m_rc_on_head = head; + // reposition + reconfigure(); +} +
M src/Slit.hhsrc/Slit.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: Slit.hh,v 1.35 2003/06/24 13:42:23 fluxgen Exp $ +/// $Id: Slit.hh,v 1.36 2003/07/19 11:55:49 rathnor Exp $ #ifndef SLIT_HH #define SLIT_HH

@@ -68,7 +68,7 @@ inline bool doAutoHide() const { return *m_rc_auto_hide; }

inline Direction direction() const { return *m_rc_direction; } inline Placement placement() const { return *m_rc_placement; } inline int getOnHead() const { return *m_rc_on_head; } - inline void saveOnHead(int head) { m_rc_on_head = head; } + void saveOnHead(int head); FbTk::Menu &menu() { return m_slitmenu; } inline const FbTk::FbWindow &window() const { return frame.window; }
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.101 2003/07/18 15:40:55 rathnor Exp $ +// $Id: Toolbar.cc,v 1.102 2003/07/19 11:55:49 rathnor Exp $ #include "Toolbar.hh"

@@ -1397,7 +1397,7 @@ *tbar.screen().menuTheme(),

tbar.screen(), tbar.screen().imageControl(), *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), - &tbar + tbar )); }

@@ -1442,3 +1442,8 @@ menu.insert("Placement", &tbar.placementMenu());

tbar.placementMenu().update(); menu.update(); } + +void Toolbar::saveOnHead(int head) { + m_rc_on_head = head; + reconfigure(); +}
M src/Toolbar.hhsrc/Toolbar.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.hh,v 1.38 2003/07/10 15:52:58 fluxgen Exp $ +// $Id: Toolbar.hh,v 1.39 2003/07/19 11:55:49 rathnor Exp $ #ifndef TOOLBAR_HH #define TOOLBAR_HH

@@ -117,6 +117,9 @@ inline const IconBar *iconBar() const { return m_iconbar.get(); }

inline const ToolbarTheme &theme() const { return m_theme; } inline ToolbarTheme &theme() { return m_theme; } bool isVertical() const; + + inline int getOnHead() const { return *m_rc_on_head; } + void saveOnHead(int head); /** @name eventhandlers
M src/Window.ccsrc/Window.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.204 2003/07/17 17:56:28 rathnor Exp $ +// $Id: Window.cc,v 1.205 2003/07/19 11:55:49 rathnor Exp $ #include "Window.hh"

@@ -698,7 +698,8 @@ (*client_it_after)->setGroupLeftWindow(leftwin);

removeClient(client); - client.m_win = screen().createWindow(client); + // m_client must be valid as there should be at least one other window + // otherwise this wouldn't be here (refer numClients() <= 1 return) m_client->raise(); setInputFocus(); return true;
M src/Xinerama.hhsrc/Xinerama.hh

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Xinerama.hh,v 1.3 2003/07/10 11:58:36 fluxgen Exp $ +// $Id: Xinerama.hh,v 1.4 2003/07/19 11:55:49 rathnor Exp $ #ifndef XINERAMA_HH #define XINERAMA_HH

@@ -42,20 +42,20 @@ /// this class holds the xinerama items

template <typename ItemType> class XineramaHeadMenuItem : public FbTk::MenuItem { public: - XineramaHeadMenuItem(const char *label, ItemType *object, int headnum, + XineramaHeadMenuItem(const char *label, ItemType &object, int headnum, FbTk::RefCount<FbTk::Command> &cmd): FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {} - XineramaHeadMenuItem(const char *label, ItemType *object, int headnum): + XineramaHeadMenuItem(const char *label, ItemType &object, int headnum): FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {} - bool isEnabled() const { return true; } //m_object->screen().getOnHead(*m_object) != m_headnum; } ; + bool isEnabled() const { return m_object.getOnHead() != m_headnum; } void click(int button, int time) { - // m_object->screen().setOnHead(*m_object, m_headnum); + m_object.saveOnHead(m_headnum); FbTk::MenuItem::click(button, time); } private: - ItemType *m_object; + ItemType &m_object; int m_headnum; };

@@ -65,16 +65,16 @@ template <typename ItemType>

class XineramaHeadMenu : public FbMenu { public: XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, - FbTk::XLayer &layer, ItemType *item); + FbTk::XLayer &layer, ItemType &item); private: - ItemType *m_object; + ItemType &m_object; }; template <typename ItemType> XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, - FbTk::XLayer &layer, ItemType *item): + FbTk::XLayer &layer, ItemType &item): FbMenu(tm, screen.screenNumber(), imgctrl, layer), m_object(item) {
M src/fluxbox.hhsrc/fluxbox.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.65 2003/07/18 15:40:55 rathnor Exp $ +// $Id: fluxbox.hh,v 1.66 2003/07/19 11:55:49 rathnor Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH

@@ -118,6 +118,8 @@ inline int colorsPerChannel() const { return *m_rc_colors_per_channel; }

inline int getNumberOfLayers() const { return *m_rc_numlayers; } // class to store layer numbers (special Resource type) + // we have a special resource type because we need to be able to name certain layers + // a Resource<int> wouldn't allow this class Layer { public: explicit Layer(int i) : m_num(i) {};