aboutsummaryrefslogtreecommitdiff
path: root/src/Xinerama.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-19 11:55:49 (GMT)
committerrathnor <rathnor>2003-07-19 11:55:49 (GMT)
commit2f1f364fa2d7c72b93d4dbcde321abace5e2109d (patch)
tree0cf9bd8b1b08922dbc09c19310d9bfb76ea64c3a /src/Xinerama.hh
parent939e750684971412eda6245ef012435c86ee2d47 (diff)
downloadfluxbox-2f1f364fa2d7c72b93d4dbcde321abace5e2109d.zip
fluxbox-2f1f364fa2d7c72b93d4dbcde321abace5e2109d.tar.bz2
fix up xinerama for heads of toolbar and slit
Diffstat (limited to 'src/Xinerama.hh')
-rw-r--r--src/Xinerama.hh18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Xinerama.hh b/src/Xinerama.hh
index ad4b3c0..8bbd3d1 100644
--- a/src/Xinerama.hh
+++ b/src/Xinerama.hh
@@ -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: Xinerama.hh,v 1.3 2003/07/10 11:58:36 fluxgen Exp $ 23// $Id: Xinerama.hh,v 1.4 2003/07/19 11:55:49 rathnor Exp $
24 24
25#ifndef XINERAMA_HH 25#ifndef XINERAMA_HH
26#define XINERAMA_HH 26#define XINERAMA_HH
@@ -42,20 +42,20 @@
42template <typename ItemType> 42template <typename ItemType>
43class XineramaHeadMenuItem : public FbTk::MenuItem { 43class XineramaHeadMenuItem : public FbTk::MenuItem {
44public: 44public:
45 XineramaHeadMenuItem(const char *label, ItemType *object, int headnum, 45 XineramaHeadMenuItem(const char *label, ItemType &object, int headnum,
46 FbTk::RefCount<FbTk::Command> &cmd): 46 FbTk::RefCount<FbTk::Command> &cmd):
47 FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {} 47 FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {}
48 XineramaHeadMenuItem(const char *label, ItemType *object, int headnum): 48 XineramaHeadMenuItem(const char *label, ItemType &object, int headnum):
49 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {} 49 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {}
50 50
51 bool isEnabled() const { return true; } //m_object->screen().getOnHead(*m_object) != m_headnum; } ; 51 bool isEnabled() const { return m_object.getOnHead() != m_headnum; }
52 void click(int button, int time) { 52 void click(int button, int time) {
53 // m_object->screen().setOnHead(*m_object, m_headnum); 53 m_object.saveOnHead(m_headnum);
54 FbTk::MenuItem::click(button, time); 54 FbTk::MenuItem::click(button, time);
55 } 55 }
56 56
57private: 57private:
58 ItemType *m_object; 58 ItemType &m_object;
59 int m_headnum; 59 int m_headnum;
60}; 60};
61 61
@@ -65,16 +65,16 @@ template <typename ItemType>
65class XineramaHeadMenu : public FbMenu { 65class XineramaHeadMenu : public FbMenu {
66public: 66public:
67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
68 FbTk::XLayer &layer, ItemType *item); 68 FbTk::XLayer &layer, ItemType &item);
69 69
70private: 70private:
71 ItemType *m_object; 71 ItemType &m_object;
72}; 72};
73 73
74 74
75template <typename ItemType> 75template <typename ItemType>
76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
77 FbTk::XLayer &layer, ItemType *item): 77 FbTk::XLayer &layer, ItemType &item):
78 FbMenu(tm, screen.screenNumber(), imgctrl, layer), 78 FbMenu(tm, screen.screenNumber(), imgctrl, layer),
79 m_object(item) 79 m_object(item)
80{ 80{