fix up xinerama for heads of toolbar and slit
This commit is contained in:
parent
939e750684
commit
2f1f364fa2
8 changed files with 39 additions and 19 deletions
|
@ -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
|
||||
|
|
11
src/Slit.cc
11
src/Slit.cc
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Slit::setupMenu() {
|
|||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ public:
|
|||
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; }
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Toolbar::setupMenus() {
|
|||
tbar.screen(),
|
||||
tbar.screen().imageControl(),
|
||||
*tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
|
||||
&tbar
|
||||
tbar
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -1442,3 +1442,8 @@ void Toolbar::setupMenus() {
|
|||
tbar.placementMenu().update();
|
||||
menu.update();
|
||||
}
|
||||
|
||||
void Toolbar::saveOnHead(int head) {
|
||||
m_rc_on_head = head;
|
||||
reconfigure();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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
|
||||
|
@ -118,6 +118,9 @@ public:
|
|||
inline ToolbarTheme &theme() { return m_theme; }
|
||||
bool isVertical() const;
|
||||
|
||||
inline int getOnHead() const { return *m_rc_on_head; }
|
||||
void saveOnHead(int head);
|
||||
|
||||
/**
|
||||
@name eventhandlers
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ bool FluxboxWindow::detachClient(WinClient &client) {
|
|||
|
||||
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;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// 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 @@
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -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.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 @@ public:
|
|||
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) {};
|
||||
|
|
Loading…
Reference in a new issue